The difference between Linux shutdown and exit commands (shutdown/poweroff/logout/exit)

logoutContrast with poweroff: It is a command
logoutspecially used to exit the current login in the command line , and it also has the function, but at the same time, it can also be used to exit the executed script, and return to the calling program itself by setting parameters, which can facilitate cross-program coordination between calls.Shellexitlogoutexitshellshell

poweroffComparison with shutdown:
Note: poweroffThe command is not recommended, it is equivalent to directly power off;

Summary:
for shutdown and shutdown
exitexit

Guess you like

Origin blog.csdn.net/Brave_heart4pzj/article/details/130846902