Linux PATH variable

Source: Internet
Author: User

Linux PATH variable 1. What is PATH? When a Linux system is started, it interacts with a shell program (possibly bash). This shell program searches for files with the same name in a specified directory path according to the given program name. You can use the searched program. (Such as the terminal program) the specified directory paths are stored in the PATH variable. In other words, the value of the variable PATH is the PATH where the system program is installed. You can run the program in this path without entering the full path. If your application is not in the PATH, you need to execute the full or relative PATH. For example,/home/$ HOME/. out or relative path name, such. /program name (point indicates your current working directory) 2. you can view and modify the environment variable PATH to customize your own PATH to avoid frequent startup of programs located outside the PATH of shell search. 3. PATH default directory (/usr/lib/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: /sbin:/bin:/usr/games) Where:/bin: Binary directory. Stores the programs used to start the system. /Usr/bin: User binary file. Stores standard programs used by users. /Usr/local/bin: local binary file. Directory for software installation. 4. Modifying the PATH through export is only useful in the current session. If the session is closed, the PATH will be restored. Modify the PATH by editing/etc/profile, which will take effect after the next startup.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.