Quick Answer: How to Check Path in Linux?
Contents

Steps

  • Find the full path to a file. If you need to find the absolute path to a file on your system, you can do so using the find command.
  • Display your path environment variable. When you type a command, the shell looks for it in the directories specified by your path.
  • Add a new directory to the path.

What does $PATH mean in Linux?

PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user.

How do I change path in Linux?

To Set PATH on Linux

  1. Change to your home directory. cd $HOME.
  2. Open the .bashrc file.
  3. Add the following line to the file. Replace the JDK directory with the name of your java installation directory.
  4. Save the file and exit. Use the source command to force Linux to reload the .bashrc file which normally is read only when you log in each time.
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest