The PATH variable in Linux stores the path to the directories where it should look for executables when you run a command.
As you can see the PATH consists of several directories like usrlocalsbin usrbin and more separated by colon .
If you want to run some executables as command from anywhere in the system you should add their location in the PATH variable.
This is common while setting up a development environment. For example imagine you downloaded and installed Java and Maven. To make your programs work properly you8217ll need to specify the location of the binaries of Maven and Java in the PATH.
This quick tutorial is about setting up PATH in Linux. Apart from the steps I8217ll also mention things you should be careful about while dealing with PATH.
The process to add a new directory to the PATH variable in Linux is essentially this.