Linked Questions

979 votes
17 answers
2.1m 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?
justingrif's user avatar
  • 11.1k
478 votes
2 answers
381k 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 ...
user avatar
73 votes
10 answers
120k 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
Poorman_Patrick's user avatar
25 votes
4 answers
15k 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 ...
user985366's user avatar
22 votes
3 answers
24k 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 ...
hatterman's user avatar
  • 2,280
15 votes
1 answer
32k 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 ~/....
Donato's user avatar
  • 583
7 votes
3 answers
14k 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 ~/...
Vitor Falcão's user avatar
3 votes
3 answers
4k 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, ...
Junaid's user avatar
  • 505
0 votes
1 answer
356 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 ...
Moh's user avatar
  • 41
1 vote
1 answer
206 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 ...
André Vinícius's user avatar