Root Refresher


In this lesson, we discuss commands that are used only as root. So we are all on the same page here, let's go back over what root is. It is critically important you know root and it does have two different meanings.

You Need to Be Root In this lesson, you'll take a look at some of the restricted commands that Unix system administrators use, and learn some of the other things you can do with your Unix system. The commands in this lesson are restricted to being run by the root user, but the information here will help you understand some of root's concerns and help conversations with your system administrator to make a little more sense. Because of the way that Unix works (with multiple users, multiple processes, and files owned by potentially hundreds of people), there are certain commands that will cause chaos if entrusted to normal users. These commands do things such as format disks, reboot the system, and create or remove devices.


Root technically has two definitions in Unix. For one, it's the name of the login account given full and complete access to all system resources.

The root directory is another one, which is also used to describe the directory named /. This is the top-level drive to where all the rest of the Unix system branches off from.

Make sure you are logged in as the root (user account) so that you can work with any of the commands seen here. If you cannot log in as root at work, follow along and wait until you can set up a test lab at home so you can work on these root-level commands. Making mistakes with these commands is even more unforgiving then any other command we have learned so far. These could really cause serious issues to the system if not done correctly. You need to make sure you practice before doing these commands in a live setting.

Using the su Command The su command creates a shell with the user ID of another user.

sudo (pronounced soo-doo) simply stands for "SuperUser do." sudo is used to allow any user to run some, if not all, root-level commands using that account. Make sure you consider this and make it just as important as the root account, because it's easy to see how quickly it can be exploited.




    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net