HowTo: Display / Echo Path Settings In Linux / UNIX / *BSD

by on February 1, 2010 · 2 comments· last updated at February 1, 2011

How do I display my current path settings under Linux / FreeBSD / OpenBSD / NetBSD / Apple OS X / UNIX like operating systems using bash or ksh or csh / tcsh shell?

The PATH variable holds the list of directories which are searched when you type a program name. To check your PATH setting use the following command. Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands to see $PATH

echo $PATH

Sample outputs:

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

How Can I Change the $PATH under Linux / UNIX?

See our faq "changing the path settings under Linux" for more information.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 2 comments… read them below or add one }

1 Kenneth McCarthy April 26, 2012 at 1:39 pm

Hi, I typed in $echo $path under USS in MVS and it did nothing.

Reply

2 Tenzin September 27, 2012 at 8:01 pm

I know its been a while.. still..for others : )

echo $PATH (path must be in caps)

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: