What Is PATH Variable in Windows and Linux?

Operating systems like Windows, Linux, macOS, Unix, BSD, etc. provides the PATH variable. The PATH variable is used to specify the executables and application paths in order to call them directly via the command-line interface without providing their full path. In this tutorial, we will examine what is PATH, how to configure PATH, how to view PATH, etc.

What Is PATH?

The Path environment variable histories goes to the Multics operating system which is predecessor of the Unix operating system. The Path variable is create in Unix shell with the version 3. And later the Path variable became part of the operating systems and a standard.

PATH Variable In Windows

Windows operating systems Windows XP, Windows 7, Windows 8, Windows 10, and Windows server versions provide the path variable by default. Windows 7 and previous versions there was only a single Path variable that is used system-wide. But with the Windows 8 and later operating systems there is two path variable called User Path Variable and System Path Variable. The User Path Variable is only used by the current user and not available system-wide. But the System Path Variable is available system-wide and can be used by all users.

System Path Variable
User Path Variable

PATH Variable In Linux (Ubuntu, Debian, Mint, Kali)

All Linux distributions like Ubuntu, Debian, Mint, Kali, etc. use the Path variable. Actually, all Unix and POSIX operating systems provide the path variable. The bash and other shell environments provide the $PATH variable by default. All paths are put into a single string where multiple paths are separated with the double colon. As an example, Ubuntu provides the following $PATH variable by default.

echo $PATH

Leave a Comment