Linked Questions

5 votes
2 answers
11k 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 ...
  • 5,001
1 vote
1 answer
2k 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 ...
  • 519
0 votes
1 answer
799 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
1 answer
807 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 ...
  • 393
1 vote
1 answer
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 ...
0 votes
1 answer
393 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
0 answers
53 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 ...
  • 235
1 vote
0 answers
34 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 ...
  • 3,530
122 votes
11 answers
163k views

How can I install the `ll` command on Mac OS X?

I'm using Mac OS X. When I SSH into servers I find the ll command useful, but it's not available on my local machine. How can I install it?
  • 4,537
131 votes
4 answers
160k views

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

What is the difference between ~/.profile and ~/.bash_profile?
  • 5,971
87 votes
4 answers
105k 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.
  • 971
68 votes
3 answers
84k 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 ...
46 votes
5 answers
109k 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 ...
  • 1,142
35 votes
6 answers
96k 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 ...
  • 705
42 votes
2 answers
20k 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 ...
  • 228k

15 30 50 per page
1
2 3 4 5 6