Updating path in bash shell

Being able to edit your $PATH is an important skill for any beginning Linux user.When you type a command into the command prompt in Linux, or in other Linux-like operating systems, all you're doing is telling it to run a program.It's recommended to set environment variables in /etc/environment 2. Refresh the environment by running the following command: . Open the file as superuser in an editor as it's a read only file e.g. System will need password to open it in editable mode. Which programs live where, and why, is beyond the scope of this article, but know that an executable program can live practically anywhere on your computer: it doesn't have to be limited to one of these directories.

But what happens if you restart your computer or create a new terminal instance? The exact way to do this depends on which shell you're running. If you're using pretty much any common Linux distribution, and haven't changed the defaults, chances are you're running Bash.

Even simple commands, like ls, cd, mkdir, rm, and others are just small programs that usually live inside a directory on your computer called /usr/bin.

There are other places on your system that commonly hold executable programs as well; some common ones include /usr/local/bin, /usr/local/sbin, and /usr/sbin.

Attempt to edit your path only if you have advanced skill; if you're unsure of how to safely do it, consult your system administrator.

If you are a student, faculty member, or staff member at Indiana University, you may also want to contact your class instructor or your department's computing support provider.

Search for updating path in bash shell:

updating path in bash shell-88updating path in bash shell-79updating path in bash shell-17

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating path in bash shell”