Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Ubuntu Linux Change the PATH     - Ubuntu under Spark development environment to build (Server)

- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)

- Firewall chapter of Linux server security configuration (Linux)

- Oracle Database Delete Delete million or more common method of heap table data (Database)

- Java foundation comb: Array (Programming)

- Zabbix monitoring platform to extract a single server graphical Python implementation of concurrent (Server)

- shell script error dirname: invalid option - b (Database)

- Ubuntu 14.10 Apache installation and configuration (Server)

- FFmpeg compiled with only H264 decoding library (Programming)

- Common Linux system performance monitoring command (Linux)

- To install and configure the Jetty server and JDK under Ubuntu 14.04.2 (Server)

- Ubuntu treated with cue file to ape and wav files automatically track points (Linux)

- LNMP summary of the issues common 502 Bad Gateway (Server)

- CentOS7 install JAVA notes (Linux)

- Varnish achieve page jump (Server)

- In the case of using cgroups Ubuntu 14.04 and Docker (Linux)

- Linux package management operations Basic entry (Linux)

- The Sublime Text 3 configuration file (Linux)

- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Ubuntu (Linux)

- How to create SWAP files in Ubuntu 14.04 (Linux)

  Ubuntu Linux Change the PATH
  Add Date : 2017-01-08      
  1. What is the environment variable (PATH)

In Linux, when you execute the command, the system according to the PATH settings to each PATH defined path search execution file, first search for the file to be executed.

We know full file ls command to view file properties named: / bin / ls (This is the absolute path), then you will not feel very strange: "Why? I can execute / bin / ls this directive anywhere yet." Why should I enter ls in any directory will be able to show some of the messages and do not speak you can not find the / bin / ls command it? This is because the PATH environment variable due to the help it!

When we execute an instruction in Qie time, for example, "ls" Well, the system will go to search for files in the PATH defined directory for each executable file named ls in accordance with the PATH setting, if the directory in the PATH defined executable file containing multiple files named ls, then first find Qie first instruction is executed with the same name!

2, how to change the PATH

. A value directly modify the $ PATH:

echo $ PATH // view the current configuration of the PATH

export PATH = $ PATH: / xxx / xxx // will be added to $ PATH path must be configured on both sides of the equal sign must not have spaces

After the first sentence // configuration can command to view the configuration.

The method of entry into force: immediately

Expiration date: temporary change, only valid in the current terminal window, the current window is closed will be restored after the original path configuration

User limitations: only the current user

b. By modifying .bashrc file :(. bashrc file in the root directory)

vi .bashrc // edit .bashrc file

// Add the last line:

export PATH = $ PATH: / xxx / xxx /// xxx / xxx bit need to add an environment variable equal on both sides did not address spaces

:( There are two methods to take effect)

.. Close the current terminal window and re-open a new terminal window will be able to take effect

.. Enter the "source .bashrc" command, effective immediately

Effective period: permanent

User limitations: only the current user


c by modifying the profile document:. (profile files in the / etc directory)

vi / etc / profile // edit profile file

// Add the last line:

export PATH = $ PATH: / xxx / xxx

The method of entry into force: the system is restarted

Effective period: permanent

User limitations: for all users

d by modifying the environment file:. (environment file in the / etc directory)

vi / etc / profile // edit profile file

Join the PATH = / ········· in ": / xxx / xxx"

The method of entry into force: the system is restarted

Effective period: permanent

User limitations: for all users
- Android Studio Personalization (Linux)
- RabbitMQ tutorial examples: RabbitMQ installation under Windows (Linux)
- Enable Intel Rapid Start in GNU / Linux (Linux)
- Ubuntu: HDF5 error: HDF5 header version does not match with the HDF5 library (Linux)
- Oracle data row split multiple lines (Database)
- Oracle table Access Control (Database)
- Distributed File System FastDFS deployment (Server)
- JavaScript notes --Objects (Programming)
- Talk about the Linux ABI compatibility Application (Linux)
- Ubuntu and derivatives installation Atom 0.104.0 (Linux)
- To create a secure network firewall with iptables Under Linux (Linux)
- MySQL completely uninstall and install Configuring Character Sets under Linux (Database)
- To control based on IP address routing policy under Linux (Linux)
- Dual system Linux (Ubuntu) into the Windows NTFS partition's mount error (Linux)
- Erase do with HTML5 Canvas and diffusion effect (Programming)
- Ubuntu 14.04 configure JDK1.8.0_25, switchable version (Linux)
- Installation and use the telnet command under CentOS 6.x (Linux)
- CentOS 6.5 start ActiveMQ being given to solve (Server)
- SUSE Linux firewall configuration notes (Linux)
- Java Virtual Machine class loading mechanism and bytecode execution engine (Programming)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.