Understanding The Root User And How to Obtain It

Dmitry 0 shares 0 comments
Understanding The Root User And How to Obtain It

If you’re new to the realm of dedicated web hosting, you may suddenly be inundated with a bunch of terms with which you’re unfamiliar. Believe it or not, there’s a lot more to web hosting than just disc space, bandwidth, and hardware: The Linux operating system underneath comes with a heap of terminology you’ll have to become acquainted with, as well as many different quirks and methods that must be learned about.

Don’t sweat it, though, Grasshopper. We understand what you’re going through, and to help you out, we’ve got a guide to one of Linux’ most important aspects ready to go: If you’re confused about what the root user does, keep reading. All is revealed in full detail just after the break.

So What is Root?

Just as a plant has foliage and flowers at the top, so does it have roots that anchor it beneath the surface. Linux operates in the same way, allowing users to perform surface level modifications to the system at the top, while a deeper administrative user (this is the “root”) sits just below, managing all the vital organs of the operating system. Most of everything you do will be done outside the root user, but when you need to do some heavy duty file management, or install a new script, you’ll want to dip below the surface and tap into the core of things.

RELATED:  How to Install ModSecurity in CentOS

Why Should I Care About The Root? Do I Need It?

The root is important, because the alternative is somewhat frightening: Imagine letting all the tenants of your dedicated server have total administrative access all the time. It’s a scary though, no? Who knows what an absentminded user could accidentally do. With that in mind, root is built into your system to ensure you only mess with the foundation when you want to. It also ensures only certain people have root access, and even then, only when they need it.

How Do I Go Rooting?

Simple! In most Linux systems (Red Hat, SUSE, CentOS, etc.) simply SSH to your server shell, and type the following command:

RELATED:  Test Drive: Ubuntu, Vista, or Windows 7


It’s that easy! Other distros, like Ubuntu Server, allow access to the superuser in slightly different ways. For example, with these, there is no permanent root access, but rather a single command to type before performing a root action. This command is:


Basic SSH Commands

Here is a list of some of the more common SSH commands.

[code lang=”shell”]
<command> -h # The -h flag provides help on a command
ls # List the contents of the current directory
cd <directory or full path> # Change to that directory or path
cp <source> <destination> # Copy the source file to the destination
cp -r <source> <destination> # Copy the source directory to the destination directory
mv <source> <destination> # Move the source file to the destination
mkdir <directory name> # Create a new directory
pico <file> # Edit file in a friendly, easy to use file editor
grep <text> <file> # Search for text within a file
wget <URI> # Download the file at the given URI to the current path
tar -xz -f <file> # Un-gzip and un-tar the given *.tgz or *.tar.gz file
rm <file> # Delete the file
rm -r <directory> # Delete the directory and all contents
killall <program name> # Kill all running processes of the program
ps # Show running processes
top # Show running processes in a graphical frontend
netstat # Show all current network connections
du # Show disk usage

RELATED:  The Top 9 Ways You Can Foil Hackers

Need more commands? I recommend David Coe‘s http://www.sshcommands.co.uk/, an easy to understand list of SSH Commands (with examples).

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>