Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Ubuntu Linux Change the PATH     - Linux Network Security: nmap port scanning software (Linux)

- How to manage the time and date at systemd Linux systems (Linux)

- Kafka cluster deployment (Server)

- VMware ghost Linux card error (Linux)

- CentOS 6.5 installation configuration DRBD (Server)

- Binary tree traversal algorithm summary (recursive and non-recursive) (Programming)

- How to install Git client in Ubuntu (Linux)

- MySQL 5.6 master-slave replication configuration (Database)

- Detailed steps - GAMIT solver (Linux)

- Java garbage collection and heap memory layout (Programming)

- Install Open vSwitch under CentOS 6.5 (Linux)

- Linux server startup and logon security settings (Linux)

- MySQL High Availability plan several options (Database)

- UUID in Java (Programming)

- 14.04.3 Ubuntu configuration and successfully compiled source code Android 6.0 r1 (Programming)

- Ubuntu 15.04 installed Nvidia Quadro series graphics driver (Linux)

- Linux shell scripts bubble sort (Programming)

- Fedora 20 installation source Xen4.3.0 (Linux)

- There is sort of a directed acyclic graph topology (Programming)

- To use slay kill user processes (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
     
         
       
         
  More:      
 
- 10 Regulation of painless SQL Schema (Database)
- To install Spotify in Ubuntu / Mint (Linux)
- 5 interesting Linux command line tips (Linux)
- 14.04.3 Ubuntu configuration and successfully compiled source code Android 6.0 r1 (Programming)
- Ubuntu 14.04 running ASP.NET Configuration Mono + Jexus (Server)
- Vim useful plugin: vundle (Linux)
- C language programming entry - macro definitions and enum (Programming)
- Debian 7.7 Installation and Configuration (Linux)
- Firewall settings oracle remote connection in Linux systems (Linux)
- Linux modify environment variables method (Linux)
- How to create a secure and easy to remember password (Linux)
- To install the Git and Github under Ubuntu (Linux)
- Qt signals and slots mechanism (Programming)
- Linux, C programming language library file handling and preparation of Makefile (Programming)
- How to network to share files between Windows, MAC and Linux (Linux)
- GNU Linux system variables (sysctl configuration commands) integrated use (Linux)
- Linux performance optimization features Tuned and ktune (Linux)
- RHEL6 install Python and other packages from source (Linux)
- Intrusion analysis and prevention tools Knark under Linux platform (Linux)
- Use SecureCRT to transfer files between Linux and Windows (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.