Questions tagged [bashrc]

.bashrc is the Bash shell configuration file for a user's terminal login session.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

User shiny doesn't seem to "see" .bashrc file

I'm running Ubuntu 20 on a Digital Ocean droplet. I use R and RStudio's Shiny-Server. When I use a Terminal logged in as user:me the prompt is customized and the cursor up error brings up the previous ...
user avatar
  • 103
1 vote
1 answer
30 views

Terminal Appearance Problem

linux noob here. I'm configuring the appearance my terminal via some commands like: vi $HOME/.bashrc then add do this command export PS1="\e[0;32m[\u@\h \W]$ \e[m " and now my terminal ...
user avatar
0 votes
0 answers
38 views

bash.bashrc alias fail: Why?

This is a permutation of the question here. This question differs in that (a) it relates to commands entered as root in a terminal as opposed to commands entered as a non-root user by invoking sudo ...
user avatar
  • 85
0 votes
1 answer
44 views

Messed up bash prompt after printf

This annoying bug bothered me. When I type printf foo or echo -n foo, the bash prompt next becomes glitchy when I navigate through previous commands. Here is a snippet of my .bashrc ...
user avatar
  • 11
7 votes
2 answers
574 views

Theres empty space between cursor and username in konsole Kubuntu 21.10

This is a brand new installation of Kubuntu 21.10 and I cannot understand why there is space between the cursor and my PC's name when I open Konsole: I have tried researching for a solution and I ...
user avatar
0 votes
2 answers
80 views

Sudo aliased to please; how do i make please see aliases?

I made sudo see aliases with alias sudo='sudo '. I aliased sudo to please (alias please=sudo), and with please it didn't worked: alias please='please '. please still didn't see my aliases. How to make ...
user avatar
-1 votes
1 answer
43 views

Terminal auto-completion does not work

The auto-completion in the terminal doesn't work that means that nothing happens. Ubuntu version is 20.04 LTS a) echo $SHELL is /bin/bash b) I reinstalled the bash completion package with sudo apt-get ...
user avatar
-1 votes
1 answer
65 views

how to add alias as a command in bashrc [duplicate]

In my bashrc i want to add an alias which would run a shell script. I am trying the below :- export termlist=/usr/data/log export runterm=cd $termlist; bash termlist.sh termlist.sh is the shell ...
user avatar
  • 121
1 vote
1 answer
40 views

function definition not working in .bashrc

submit () { kaggle c submit -f $@ -m MSG h-and-m-personalized-fashion-recommendations; } I want to use the above function as shorthand for submitting files to kaggle competitions by typing submit ...
user avatar
  • 37
0 votes
3 answers
75 views

Where to Source your .Profile (Ubuntu 21.10)

Recent instructional video I was watching said to put your export PATH="$PATH..." statement in your .profile and after sourcing manually in the terminal to append ". ~/.profile" to ...
user avatar
0 votes
2 answers
512 views

Bash errors: Unexpected EOF while looking for matching, Syntax error: Unexpected end of file

I ran it through ShellCheck but could not understand what it wanted me to change,so here I am. On opening terminal: bash: /home/helpabrother/.bashrc: line 118: unexpected EOF while looking for ...
user avatar
1 vote
0 answers
33 views

bash: `set +m` option does not work when placed in the .bashrc file

If I enter the command: set +m at the end of the .bashrc file, when I run the command: echo $- the option m is missing as it should be, but... If I enter the command: { sync & } 2> /dev/null ...
user avatar
-2 votes
1 answer
137 views

503 Service Unavailable [duplicate]

I am trying to install a library but i am getting this error: $ sudo apt-get install libkim-api-dev Reading package lists... Done Building dependency tree Reading state information... Done The ...
user avatar
2 votes
1 answer
68 views

How do I open a terminal with another user name?

Whenever I open the terminal, I want to login as another user (another_user). I tried putting the below in my .bashrc, but it prompts me for a password everytime I open the terminal. # in .bashrc su - ...
user avatar
  • 131
0 votes
0 answers
54 views

How to get an aliased command to execute from a menu entry?

I re-furbish PCs for a small non-profit and we use xubuntu cloned using clonezilla. I am experiencing an issue where I set up an alias: alias pkexec='pkexec /usr/bin/env DISPLAY=$DISPLAY XAUTHORITY=$...
user avatar
0 votes
0 answers
16 views

Git autocompletions raises the error "bash: [: -lt: unary operator expected" [duplicate]

In a Ubuntu 21.10 (new computer with setup) with git version 2.32.0 and bash version 5.1.8(1)-release (x86_64-pc-linux-gnu) I can't use alias for git checkout because it generates the error bash: [: -...
user avatar
2 votes
3 answers
128 views

Terminal won't display colors for non-root users

When I'm logged in as root, I can display colors, but not when I switch to another user. The command ls --color=auto only displays colors once when logged as normal user. I searched a lot and did a ...
user avatar
0 votes
2 answers
234 views

how to create input read with newline in bash?

I want to ask I have a problem, how do I get input in bash to do newlines? read -p "List Name: " list cat <<EOF >names.txt List Names: $list EOF i can not do a new line or use ...
user avatar
1 vote
1 answer
100 views

my .bashrc has a typo and I do not know how to fix it

I was trying to create an alias for a command, I added the alias to the bottom of .bashrc file but when I try to run source .bashrc I get: .bashrc (line 6): 'case' builtin not inside of switch block ...
user avatar
  • 206
0 votes
1 answer
46 views

while invoking 'gnome-terminal' from the terminal , the environment variables of the previous session has a scope in the newly opened terminal

I have opened a gnome-terminal and did this: $ export abc=abcd $ echo $abc abcd $ gnome-terminal The above commands invoked an another gnome-terminal and tried this: $ echo $abc abcd #I am not ...
user avatar
0 votes
1 answer
221 views

Can't see python virtual environment name in bash prompt when PROMPT_COMMAND is being used to modify PS1

I shortened my bash prompt by appending the following code block in ~/.bashrc file. get_PS1(){ local pwdmaxlen=30 local trunc_symbol="\[$(tput setaf 1)$(tput bold)\]..." if [...
user avatar
  • 43
0 votes
0 answers
24 views

Syntax error when I use Terminal caused by tor proxy

I get this error when I open a terminal: Bash: /home/admin/.bashrc: line 118: syntax error: unexpected end of file This started after I manually edited the .bashrc file to remove the tor proxy.
user avatar
3 votes
1 answer
328 views

how to define a variable in .bashrc so i can use it as path

Hi ( sorry for my bad English ) I just learned how to permanently set a key for a specific value using alias: .bashrc alias please='sudo' alias go='cd' alias destroy='rm -rf' And it works perfectly ...
user avatar
  • 172
0 votes
1 answer
39 views

Bash Function/Alias name collision causes seg fault

The problem in this post also happened to me. mkdir crashes bash I couldn't comment there because no reputation. Can anyone elucidate why this happens? It happens at runtime Not when the function is ...
user avatar
  • 1
0 votes
0 answers
80 views

~/.bashrc.swp file corrupt

When I opened vi ~/.bashrc, it gives the below error: how to fix it? E325: ATTENTION Found a swap file by the name "~/.bashrc.swp" owned by: imren dated: Thu Dec 23 00:38:57 ...
user avatar
0 votes
1 answer
33 views

Creating a file that will open another file in VS Code when it is double-clicked

I want to write a command in ~/.bashrcthat will create a trigger file that will open a different target file in a different folder when I double-click on the trigger file. I want the target file to ...
user avatar
3 votes
1 answer
424 views

How to run a command after a delay at login with .bashrc

I'm trying to run a command line on .bashrc after 20 seconds so I'm doing sleep 20 && cp text1.txt text2.txt But the system will not start until the 20 seconds go by, and then it will start. ...
user avatar
3 votes
3 answers
583 views

Risks of replacing .bashrc file from one computer to another

I have 2 Asus Zenbook laptops running Ubuntu 20.04.3LTS (my current laptop and I kept my old laptop as an emergency backup system as I can't be without a laptop). I very rarely use the old one, but I ...
user avatar
  • 1,234
0 votes
1 answer
61 views

How to prevent the gio open command from outputting texting in the console?

I use the gio open command very often, so what I have done is I added an alias for it in the .bashrc file alias open="gio open" Hence, I can simply write open . or open ~/Pictures/example....
user avatar
  • 13
3 votes
1 answer
169 views

Can not call defined funtions from .bashrc

I have a function in .bashrc like this: function gs () { cmm="$1" if test -z "$cmm" then cmm="This is Manh Cuong's commit 🌻." fi git add . && ...
user avatar
1 vote
0 answers
154 views

When I edit .bashrc in Ubuntu 20.04, it does not ask me to save anymore

I'm not sure what happened but when I sudo nano ~/.bashrc to add a couple of exports #spotify export SPOTIFY_CLIENT_ID='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' export SPOTIFY_CLIENT_SECRET='...
user avatar
0 votes
1 answer
294 views

Why is my alias from .bashrc not working?

I've written a line in .bashrc alias untar='sudo tar –xvzf' Now, when I use "untar" in bash I get the error: untar filename.tar.gz tar: invalid option -- '�' Try 'tar --help' or 'tar --...
user avatar
0 votes
0 answers
79 views

/bin/sh:1:icoFoam:not found

I have installed openfoam software from dockerfile with using ubuntu 18.04 as base image and used CMD command to check the execution of the software. The software command works perfectly from inside ...
user avatar
2 votes
2 answers
112 views

I was trying to add openfoam's path to my bashrc and it's giving me an error

This is the error bash: /home/me/.bashrc: line 115: syntax error near unexpected token `fi' bash: /home/me/.bashrc: line 115: `fi' and the bashrc is # ~/.bashrc: executed by bash(1) for non-login ...
user avatar
  • 21
0 votes
1 answer
54 views

Unable to login to desktop 20.04

I cannot login to Ubuntu 20.04 after installation of zsh-shell I added an exec zsh on top of my .bashrc file to change my default terminal to make zsh my default shell. On reboot, I couldn't log in.On ...
user avatar
0 votes
0 answers
62 views

How to start a screen session or reconnect to old one on if it exists on remote server

When someone logins into my remote server, I'd like them to automatically connect to a screen session. The way I tried until now it generated a new screen every time someone connected to the server or ...
user avatar
0 votes
1 answer
300 views

How to create calculator with bash?

How to create calculator with bash ? example read -p "calculator count: " calc echo '$((calc))' | bc i input 2+2 output (standard_in) 1: illegal character: $ how to fix ? I just ...
user avatar
1 vote
4 answers
712 views

How I can run application from anywhere in the terminal without being in the full path

I have an application that I can run while I am in the file location as the below: -$ cd home/myApps/app -$ ./run.sh I want to call the run.sh from anywhere in my terminal without being in the full ...
user avatar
0 votes
1 answer
1k views

bash -c "source ~/.profile" doesn't source ~/.profile

Here's some output from inside a Docker container (running Ubuntu 18.04) which seems to be acting up. # source ~/.profile net.ipv4.ipfrag_high_thresh = 134217728 net.core.rmem_default = 10485760 ...
user avatar
0 votes
0 answers
43 views

Not able to install any software on Ubuntu

I tried to install MatLAB in the directory /usr/local/MATLAB/R2018a/bin and add this path to .bashrc. After this, I was able to launch Matlab by just typing Matlab in bash. But now, when I try to ...
user avatar
0 votes
0 answers
21 views

I just installed Quixel and Nuke, how can I create an alias for them in Ubuntu? [duplicate]

I just installed Quixel Bridge and Nuke. They are not found in the application list so I have no way to drag them to desktop favorite. Nor did they like Google Chrome that could be started in terminal ...
user avatar
  • 1
1 vote
1 answer
37 views

Handy command for editing previously executed mistyped command and overwriting history entry with the fixed one

until recently I was pretty sure that fc command opens previously executed command in the default editor, executes submitted changes and overwrites last entry from the bash history. However, seems ...
user avatar
  • 31
0 votes
0 answers
103 views

proxy is only working with GUI but not when I set through terminal with ~/.bashrc

I have read a lot of guides about setting a proxy for ubuntu. I can do it with the GUI in the network settings and it automatically starts using the proxy I specified and when I open firefox or chrome ...
user avatar
  • 1
2 votes
1 answer
748 views

Edit permanently .bashrc

I am a beginner Ubuntu user. I am booting Ubuntu from an USB flash drive and I need to edit the .bashrc file but every time I shut down or restart the computer the edits I made disappear. Is it ...
user avatar
0 votes
1 answer
48 views

Hava alias shortcut available in new terminal session

The output of command $ alias will not display for me in Ubuntu 18.04. as I research here This is only available for my current terminal session, and if I open a new terminal session, the Alias ...
user avatar
6 votes
1 answer
442 views

Ubuntu Desktop: Why the .profile script is executed in an interactive non-login shell?

I understand about the difference between Interactive login and Interactive non-login According with this excellent post: Zsh/Bash startup files loading order (.bashrc, .zshrc etc.) we have the ...
user avatar
0 votes
0 answers
169 views

'exit' command not working anymore

I was trying to install certain software and edited bashrc file, due to various errors I replaced it with default basrc file, but now 'exit' command is not exiting the terminal, its simply displaying '...
user avatar
1 vote
2 answers
1k views

adb command not found after installed it

I have install adb from terminal. But when I type "adb version" it's not found. Can anyone help me about this problem?
user avatar
0 votes
1 answer
234 views

Update info - how to currently set Java_home?

I'am trying to get Maven running. I have installed JDK and Maven. Thus I have been trying to set the Java_home variable for three days now, I cannot get it working. I have followed the instructions of ...
user avatar
0 votes
0 answers
39 views

bash: export: `/home/shameen:/usr/bin:/usr/local/bin': not a valid identifier bash: ./bashrc: No such file or directory

I just keep getting this error as soon as I open the terminal. Is there any way that I can remove it? bash: export: `/home/shameen:/usr/bin:/usr/local/bin': not a valid identifier bash: ./bashrc: No ...
user avatar

1
2 3 4 5
15