Linked Questions

752
votes
17answers
1.4m views

How to add a directory to the PATH?

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?
299
votes
2answers
218k views

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin

I have six directories with command files. These are /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin. What are the differences between these? If I'm writing my own scripts, where ...
57
votes
10answers
90k views

How to run scripts without typing the full path?

I'd like to know if there is a way to run program/shell script without typing full path: /opt/idea/bin/idea.sh
15
votes
3answers
4k views

Where should I put my bash scripts

I have a few very simple bash scripts that I cobbled together for things that I do regularly. One of them is to run duplicity to do my backup tasks. Nothing clever just a bunch of if .. then ...
16
votes
2answers
7k views

Non-sudo alternative to /usr/local/bin for common scripts

I'm used to putting common scripts in /usr/local/bin so that I can execute them from anywhere with the terminal. For example, I make a shell script named 1, make it executable with chmod +x 1 and put ...
9
votes
1answer
14k views

Where is the system-wide $PATH variable set?

I am using Ubuntu Desktop 14.04, and as such, I am using the non-login shell. When I open the GUI terminal, first the non-login shell sessions read the following startup files: /etc/bash.bashrc ~/....
7
votes
3answers
6k views

How to create my own terminal commands [duplicate]

I know how to create my custom terminal commands and that would be really useful for me in compiling all my java classes in a folder. I also see that for doing this people usually creates a folder ~/...
2
votes
3answers
3k views

External USB hard drive, WD Elements, not power off itself

I own a Seagate Free Agent external hard drive for last 4-5 years. After plugged in and finished with file transfers I will click menu 'Safely remove'. Then it will gracefully shut down itself, ...
0
votes
1answer
308 views

How to add a folder in environment variable permanently [duplicate]

I know similar questions have been asked before on here (for example: How to add a directory to the PATH?) However, I don't know what to add and where to add this. If I open ~/.profile, it looks ...
1
vote
1answer
105 views

“Envoriment variable PATH” on Ubuntu [duplicate]

When we install a program using apt-get, after installed it's available in terminal, normally, when we just call "your name" independent of context directory we are. On Windows, when we add a path to ...