Linux boot /etc/rc.local failure problem to provide three ways to solve the boot can not start the rc.local file problem, need friends refer to the following.
/etc/rc.local = /etc/rc.local
1, echo /etc/rc.local>
1, echo /etc/rc.local>; > /etc/profile & & Source /etc/profile
echo /etc/rc.local> > ~/.bash_profile & & The source/etc/profile
in the/etc/rc3. D increase a startup scripts directory, and then restart the test, the content is as follows:
# [email protected]
route add default gateway 192.168.1.1 dev xenbr0
Some commands cannot be executed in /etc/rc.local
To add a service that automatically runs when the system is started, simply add it to the /etc/rc.local script file. When the command or program is running without a path, for example:
Distccd –user nobody –allow 10.10.98.0/24 –log-file=/var/log/distcc.log –verbose –daemon
loadavg-s 10.10.98.20>; /dev/null 2> & 1
Note that the distccd, loadavg commands are stored in /usr/local/bin/
When the system executes these commands, it will report an error and cannot execute properly!
Because the PATH environment variable was not fully initialized when the rc.local script was executed, the directory /usr/local/bin/ was added to the PATH environment variable only after /etc/profile was executed.
Executing commands in /usr/local/bin/directory in /etc/rc.local requires absolute path.
- source, ~/.bashrc, ~/.bash_ Profile details
- The Linux terminal appears bash: setup.bash : no such file or directory, and. Bashrc file
- Linux basic command execution error: the solution of command not found
- Command not found: ADB appears on Mac
- Springboot starts, closes, and restarts scripts as jar packages
- Shell script: syntax error: bad for loop variable error resolution
- Could’t find path to unrear Library
- About the cause of the long-standing ADO error: unspecified error “(error code = 0x80004005) (excerpt from the Internet)
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-2: ordinal not in range(128)
- Solve the problem of prompt couldn’t find path to unrear library after installing unrear in Python
- Syntax error near unexpected token `newline’script cannot be executed
- How to set JAVA_HOME on mac
- How to Fix unexpected directory layout in go language
- Installation and use of graphviz under mac
- supervisor ERROR (spawn error)
- Exponentiation in shell
- How to Fix Error accessing PRODUCT_USER_PROFILE
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Idapython: the solution of importing “site” failed error
- Error: could not find java.dll Error: could not find Java se runtime environment solution