Sunday, February 24, 2013

sudo su Shutdown in Linux Terminal

If your learning how to use Linux in command line via Terminal like lets say Ubuntu Linux then here is a new command for you!

After you've done all your practice for the day how do you shut it down?

You can Abviosly shut it down by pressing the power button in the Uppper right corner of the screen but you want to learn how to work more like a pro!

So why not shut it down via terminal with the following commands!

When you open the Terminal in Debian Type Linux like Ubuntu first type sudo su and press Enter to open the command line with Super User Powers!

That’s really what sudo su stands for super user privileges because it allows you to do things that normally you wouldn’t be able to do by default.

There are many advanced commands that need the sudo su privileges to run properly.

Once you press Enter it will mostly likely ask for your user account password so just type it out in the terminal and press Enter again.

This will grant you root access and now you type shutdown -h now and press Enter!

How about if you are downloading a large File from the internet but you need to  leave the house cause you are in a hurry! Both things are important to complete but you can do only one thing at a time!

Suppose like now its 5 o’clock in the evening and the download will be complete by 5:20 but before you leave the house now just open the terminal and schedule it to shut down by 5:25 to be certain that the file is completely downloaded!

So instructions are really the same as above except now you can specify at what time you would like it for the computer to shut down with a minor modification by typing shutdown -h 17:25 and press Enter.

Notice I recommend typing 17:25 not 5:25 because Linux uses the 24 hour clock in the command line and if you typed 5:25 it would assume you mean in the morning so it would still work but for allot more additional hours without need!







No comments: