" ශ්‍රී ලාංකීය අභිමානය " ශ්‍රී ලංකාවේ කොල්ලො කෙල්ලොන්ට 2023 සිරාම බ්ලොග් එක.. Blog Eka.. ப்லொக் எக.. "ALLSRILANKANS BLOG"

Thursday, April 28, 2016

ලිනක්ස් එක නැත්තටම නැති කරමුද නැත්තම් ? -LINUX COMMANDS-


හායි ඔන්න මම අයෙමත් ආවේ ලිනක්ස් ගැන තවත් පොඩි වැඩ කෑල්ලක් ගැන කියලා දෙන්න මෙන්න මේකයි කතාව ලිනක්ස් එකේ ටර්මිනල් කෝඩ් වලින් මැෂින් එක නැති කරලා දාන්න එහෙනම් ඔයාලත් පොඩි ට්‍රයි එකක් දාලා බලන්නකෝ ..

How To Shutdown Your Computer Using The Linux Terminal

The command required to shutdown your machine is as follows:

shutdown
It is highly likely that you need to have elevated privileges to use the shutdown command so you are more likely to use the sudo command as follows:

sudo shutdown
The output from the above command will say something along the lines of "shutdown scheduled for <time>, use shutdown -c to cancel".

Generally it is better to specify when you want the computer to shutdown. If you want the computer to shutdown immediately use the following command:

sudo shutdown now
The time element can be specified in a number of ways. For example you could use the following command to also shutdown the computer immediately:

sudo shutdown 0
The number refers to the number of minutes to wait before the system attempts to shut down.

Incidentally the command sudo shutdown without any time element is the equivalent to running the following command:

sudo shutdown 1
The default therefore is 1 minute.

You can also specify a set time in hours and minutes to shut down your computer as follows:

sudo shutdown 22:00
When the amount of time until shut down is less than 5 minutes the system will not allow any more users to login.

If you are running a system with multiple users you can specify a message which will appear on all users screens letting them know that a shutdown is going to occur.

sudo shutdown 5 "save your work, system going down"
For completeness there is another switch you can use which is as follows:

sudo shutdown -P now
Technically you don't need to use the -p as it actually stands for poweroff and the default action for shutdown is to poweroff. If you want to guarantee that the machine powers off and doesn't just halt then use the -P switch.

If you are better at remembering words over switches you might prefer to use the following:

sudo shutdown --poweroff now
How To Reboot Your Computer Using The Linux Command Line

The command for rebooting your computer is also shutdown. There is actually a reboot command as well which is used for legacy purposes and logically speaking is a more obvious command to use to reboot your computer but most people actually use the following command to reboot their computer:

sudo shutdown -r
The same rules apply to the reboot command as they do for the shutdown command.

What this means is that by default the shutdown -r command on its own will reboot the computer after 1 minute.

To reboot immediately you have to specify either of the following commands:

sudo shutdown -r 0

sudo shutdown -r now
If you want the computer to reboot in 5 minutes you can specify the following command:

sudo shutdown -r 5
You can also specify a time to reboot the computer in hours and minutes as follows:

sudo shutdown -r 22:00
Finally as with the shutdown procedure you can specify a message to be displayed to all users of the system letting them know the system is going down.

sudo shutdown -r 22:00 "the system is going to bounce. Boing!!!"
If you prefer to you can use the following instead of the -r switch:

sudo shutdown --reboot now
Make The System Halt

You can specify one more command which shuts down the operating system but doesn't actually power off the machine.

The command is as follows:

sudo shutdown -H
You can also use the following command:

sudo shutdown --halt
How To Cancel A Shutdown

If you have scheduled a shutdown for the future then you can actually cancel the shutdown using the following command:

shutdown -c
If you have used either shutdown now or shutdown 0 then this won't have time to work.
Share:

0 comments:

Post a Comment

හ්ම්ම්ම්ම් ඔන්න එහෙනම් යාලුවනේ යන්න කලින් පොඩි අදහසක් දීලා අපිව පොඩ්ඩක් උස්සලා තිබ්බොත් හොඳයි නේද? ඒක එහෙමයි කියලා මගේ බ්ලොගයේ තියන් වැරදි අඩුපාඩු කියන්නේ නැතුව යන්න එපා. හැබැයි නිකන්ම ඇවිත් යන්නේ නැතුව පොඩි අදහසක් දීලා යන්න හොඳේ...

අපේ ලිපි කෙලින්ම Email එකට

Enter your email address:

Delivered by FeedBurner


Blog Archive


මුහුණ පොතේ අපි

පැමිණ ගිය අය

අපේ යාලුවෝ