![]() It’s not visible if we execute the ls command without flags. In Linux, the dot before the name of a file means that the file is hidden. It’s usually defined somewhere in your home directory, and specifically in one of the hidden files used in Linux to configure your user environment: the. Wondering where is the PATH environment variable defined? Makes sense? Where Is PATH Defined in Linux? The fact that /usr/bin/ is in the PATH allows us to execute the chmod command withouth having to specify its full path. If I use the which command to check the full path of the chmod command I get the following: which chmodĪs you can see this is exactly the same directory in the PATH, /usr/bin. Let’s take the chmod command as an example. To restrict the list of commands returned by ls, I just look for commands starting with ch (I use the ch* wildcard to do that): ls -al /usr/bin/ch* Let’s have a look at some of the commands present in the /usr/bin directory. In the list of directories inside the PATH you can see the home directory for my current user (ec2-user) but also directories like /usr/bin. ![]() You can use the echo command to see the value of the PATH variable: ~]$ echo $PATH It contains a list of directories used by Linux to search for commands that can be executed without specifying their full path. ![]() ![]() The PATH environment variable is one of the most important environment variables in a Linux system. Linux system are configured with a pre-defined set of environment variables required by the operating system to function properly.
0 Comments
Leave a Reply. |