CentOS – bash:systemctl :command not found
Many commands in CentOS, such as systemctl, cannot be found
Many commands in CentOS, such as systemctl, cannot be found
Today, when configuring the server environment variables, I suddenly found that many commands couldn’t be used
the situation at that time is as follows:
execution: echo $path
as shown in the figure:
obviously, the problem lies in the environment variables, and the profile file needs to be modified, Because I don’t know what’s wrong (cat can’t be used), so I can execute it directly: echo 'export path = $path/usr/local/SBIN/usr/local/bin/SBIN/bin/usr/SBIN/usr/bin' & gt>/Etc/profile
write the environment variable parameters to the profile file
and then execute: source/etc/profile
and then try the command:
in this way, let’s see what is wrong in the environment variable
a very low-level error, which directly writes the address, covering the previously configured environment variable, As a result, a large number of commands cannot be used
after modification:
save exit, execute: source/etc/profile
so far, the perfect solution
Similar Posts:
- Ifconfig command not found for Linux Installation Errors [How to Solve]
- -bash: ls: command not found [How to Solve]
- Linux use the man command error: Man: command not found [How to Solve]
- Linux cron has no effect after executing the script, and the log reports an error orphan (no passwd entry)
- [Solved] Ls command not found is caused by the configuration of environment variables
- Mac ADB prompts command not found
- linux sudo java : command not found
- Centos7 Install virtualenv Error bash: virtualenv: command not found…
- [Solved] Mac install maven Error: zsh: command not found: MVN
- [Solved] JSCH cannot run JAVA bash:java:Command not found.