Tag Archives: CentOS Error

CentOS Error -bash:systemctl:command not found

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