Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux Tutorial Share: How to sudo command to define the PATH environment variable     - Varnish configuration language VCL and its built-in variables (Server)

- Git uses Details (Linux)

- Zabbix monitoring tool deployment under Ubuntu server (Server)

- Linux process stack and process function stack frame (Linux)

- CentOS6 installed Tomcat (Server)

- Git large file storage will help handle large binary files (Linux)

- Php and MySQL command add to the environment variable method in Linux system (Linux)

- Development environment to build MEAN In Ubuntu 15.10 (Server)

- Linux file time Comments ctime mtime atime (Linux)

- CentOS6 installation configuration rsh (Server)

- Java programmers talk about those advanced knowledge and direction (Programming)

- Protect against network attacks using Linux system firewall (Linux)

- CentOS 7 hard disk expansion toss record (Linux)

- Docker + Nginx + Tomcat7 simple load balancing configuration (Server)

- MySQL service failed to start thinking of settlement under CentOS7 (Database)

- CentOS 7 How to connect to a wireless network (Linux)

- JavaScript: understanding regular expressions (Programming)

- Ubuntu 14.10 / 14.04 / 12.04 installation GNOME Pie 0.5.6 (Linux)

- Linux environment SSH login password instead of using the RSA Certificate (Linux)

- Oracle Bug caused by the collection of AWR Snapshot fault (Database)

  Linux Tutorial Share: How to sudo command to define the PATH environment variable
  Add Date : 2018-11-21      
  Problem: I installed a program to the next / usr / local / bin directory, the program requires root privileges to perform, when I use sudo to execute it, you receive the "sudo: XXXXX: command not found" error message, no know why / usr / local / bin is not included in the PATH environment variable to the following, how do I solve this problem?

When you use sudo to execute a program, in consideration of safety, the program will be executed in a new environment is minimized, that is, such as PATH environment variable, under sudo command has been reset to the default state. So when a newly initialized PATH variable is not included in the program directory where you want to run, and to execute with sudo, you'll get "command not found" error message.

To change the initial value of PATH in sudo session, open the / etc / sudoers file with a text editor, find "secure_path" line when you execute the command sudo path "secure_path" will be included in the PATH variable is used as the default .

Add the path (such as / usr / local / bin) required to under "secure_path", met at the opening of the problem will be solved.
Defaults secure_path = / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / bin

The changes will take effect immediately.
- Upgrading to Debian 7.6 glibc 2.15 (Linux)
- A detailed introduction to the Hadoop ecosystem (Server)
- How to clear the DNS query cache under Linux / Unix / Mac (Linux)
- Java foundation comb: Array (Programming)
- Ubuntu Locale configuration problem solving Can not set LC_CTYPE (Linux)
- Linux system started to learn: Teaches you install Ubuntu 15.04 on VirtualBox (Linux)
- Golang use Oracle database on Ubuntu 14.04 (Linux)
- Oracle GoldenGate encryption (Database)
- Teach you the Ubuntu Server enabled SSH multifactor authentication (Server)
- linux remote control software (Linux)
- Let the router be your security barrier against external attack (Linux)
- Oracle RMAN repair logical bad blocks (Database)
- The difference between Linux su and sudo commands (Linux)
- Linux simple commands (Linux)
- Nginx load balancing configuration (TCP proxy) (Server)
- 12 novice Linux command must learn (Linux)
- Ubuntu 14.04 build Android 5.1 development environment and compiler (Linux)
- Ubuntu 15.04 using the Eclipse 4.4, Java 8 and WTP (Linux)
- How to use Xmanager Remote Desktop and VNC Log (Linux)
- Linux 10 useful examples of command-line completion (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.