Linked Questions

5
votes
2answers
8k views

Setting path environment variable for desktop launchers [duplicate]

I set a custom $PATH in ~/.bashrc with PATH=$HOME/.bin:$PATH. When I launch the geany from the terminal it is able to find my custom build tools that are located in $HOME/.bin. When I launch Geany ...
1
vote
1answer
1k views

Terminal sometimes fails to find executables on local directory [duplicate]

I can open my terminal emulator via a keyboard shortcut or through the apps finder that executes the exo-open --launch TerminalEmulator command. My terminal starts and I can cd to any directory and ...
0
votes
1answer
673 views

What is the scope of environment variables defined in ~/.bashrc? [duplicate]

Considering that environment variables defined in a shell are available to the child processes of the shell. When we open a terminal, it reads .bashrc and executes its commands. That means the .bashrc ...
1
vote
1answer
1k views

How and where should I add a PATH? [duplicate]

I need to add a new directory to my PATH so that SublimeText can find it. I assume this should be added to either .bash_profile, .bashrc, or .profile. Which one should I add it to? .bash_profile ...
1
vote
1answer
655 views

Running a bash script on double click does not have all environment variables [duplicate]

I am running Debian. I have a jar file that I need to execute. A wrapper bash script does a java -jar MyProg.jar. The jar also calls some C code for which LD_LIBRARY_PATH needs to be set. I have set ...
0
votes
1answer
352 views

Fedora 7 server export in .bashrc not getting set [duplicate]

I'm trying to set the JAVA_HOME environment variable in my .bashrc but every time I log back in it gets unset again to its original value, below is my .bashrc file # .bashrc # User specific aliases ...
2
votes
0answers
39 views

What goes in ~/.bash_profile and what goes in ~/.bashrc? [duplicate]

If bash is my shell, what should I put in ~/.bash_profile and what should I put in ~/.bashrc? My understanding is that ~/.bash_profile is read on login, and ~/.bashrc is read for each new interactive ...
1
vote
0answers
30 views

In which file should one put the PATH and LD_LIBRARY_PATH variables? [duplicate]

After having installed cuda drivers on Ubuntu 16.04, the program told me to make sure to have /usr/local/cuda-8.0 in the PATH variable and /usr/local/cuda-8.0/lib64 in the LD_LIBRARY_PATH variable. I ...
71
votes
4answers
90k views

How do I change the default text editor in the Debian (squeeze) distro

"Joe's own editor" does not come naturally to me. How do I change to using nano or vim? I've tried export EDITOR=nano but it doesn't seem to be respected. I'd like visudo to respect this as well.
87
votes
4answers
109k views

What is the difference between ~/.profile and ~/.bash_profile?

What is the difference between ~/.profile and ~/.bash_profile?
55
votes
3answers
63k views

Using export in .bashrc

I have noticed in my .bashrc that some lines have export in front of them, such as export HISTTIMEFORMAT="%b-%d %H:%M " ... export MYSQL_HISTFILE="/root/.mysql_history" whereas others don't, such ...
41
votes
5answers
88k views

Why doesn't my ~/.bash_profile work?

I'm using Linux Mint. My login shell (cat /etc/passwd | grep myUserName) is bash. After I start my graphical desktop environment and run a terminal emulator from it, I can see that .bash_profile is ...
27
votes
6answers
81k views

How to add a function to .bash_profile/.profile/bashrc in shell?

I have a function which converts epoch time to date. Here is the definition date1(){ date -d @$1 } I'd like to be able to write: $ date1 xxxyyy Where xxxyyy is the parameter I pass into my ...
40
votes
2answers
14k views

Where is cron's PATH set?

Cron doesn't use the path of the user whose crontab it is and, instead, has its own. It can easily be changed by adding PATH=/foo/bar at the beginning of the crontab, and the classic workaround is to ...
24
votes
5answers
61k views

Export an env variable to be available at all sub shells, and possible to be modified?

Suppose I have export MY_VAR=0 in ~/.bashrc. I have an opened gnome terminal, and in this terminal, I change $MY_VAR value to 200. So, if I do echo $MY_VAR in this terminal, 200 is shown. Now, I ...

15 30 50 per page
1
2 3 4 5 6