how to use shutdown, restart, sleep and lock commands in linux | Pro Tech guides

how to use shutdown, restart, sleep and lock commands in linux

In linux there are some terminal commands to perform shutdown/power off, restart, sleep and lock. You can also use this when GUI freezes or ...

How to use shutdown/power off, restart/reboot, sleep/suspend and lock commands in linux

shutdown command in linux
shutdown, restart, sleep commands in linux


Today you will learn How to use Shutdown, Reboot, Scheduled Shutdown, sleep and lock in linux using Terminal commands.

Shutdown Immediately

$sudo shutdown now (or) poweroff
  •  Open the terminal.
  • Type "sudo shutdown now" and press ENTER.

Scheduled shutdown

schedule shutdown in linux using terminal
Schedule Shutdown

$sudo shutdown +10 (this 10 indicates, Ten minutes)
  • Just type "sudo shutdown -h +(No.of minutes)" press ENTER.
  • The system will shutdown when the given time is Reached.

To cancel the scheduled shutdown

$sudo shutdown -c
  •  Type "sudo shutdown -c" press ENTER.
  • This will cancel the scheduled shutdown.

Scheduled shutdown with message

shutdown command in linux with time and message
Schedule shutdown with Message

$sudo shutdown +15 "your message"
  • Type the above command and press ENTER.
  • To shut down with a message.

Shutdown by time

$sudo shutdown +09:00 (hour:minutes)
  • Write "shutdown +09:00" and press ENTER.

Reboot

$shuutdown -r (or) reboot
  •  To Reboot your computer.
  • Just say "shutdown -r" (or) "reboot" and press ENTER.

Lock

$loginctl lock-session
  •  Type "loginctl lock-session" and press ENTER.
  • To Lock your System.

Suspend

$systemctl suspend
  •  Just write "systemctl suspend" press ENTER.
  • To Suspend your system.
 

Conclusion

In this way you can perform Shutdown, Scheduled Shutdown, Reboot, Lock and Suspend in Linux.

HAVE A NICE DAY 💙

Related,

Name

Apps,3,Games,1,Linux,38,Linux Commands,37,Network-Devices,1,Networking,1,Terminal Apps,2,Termux,17,Userland,3,Windows,1,
ltr
item
Pro Tech guides: how to use shutdown, restart, sleep and lock commands in linux
how to use shutdown, restart, sleep and lock commands in linux
In linux there are some terminal commands to perform shutdown/power off, restart, sleep and lock. You can also use this when GUI freezes or ...
https://1.bp.blogspot.com/-CST4Zjbk_Hc/YPGIOOHSAwI/AAAAAAAADi4/m5oMVoWXRsI3drl9WVl_OvgxxcKiAzRzgCNcBGAsYHQ/s16000/shutdown-command-in-linux.webp
https://1.bp.blogspot.com/-CST4Zjbk_Hc/YPGIOOHSAwI/AAAAAAAADi4/m5oMVoWXRsI3drl9WVl_OvgxxcKiAzRzgCNcBGAsYHQ/s72-c/shutdown-command-in-linux.webp
Pro Tech guides
http://www.protechguidez.com/2021/07/how-to-use-shutdown-restart-sleep-commands-in-linux.html
http://www.protechguidez.com/
http://www.protechguidez.com/
http://www.protechguidez.com/2021/07/how-to-use-shutdown-restart-sleep-commands-in-linux.html
true
7053638852026728047
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content