{"id":2613,"date":"2011-10-05T13:17:16","date_gmt":"2011-10-05T17:17:16","guid":{"rendered":"https:\/\/webhostinggeeks.com\/blog\/?p=2613"},"modified":"2021-10-19T06:48:18","modified_gmt":"2021-10-19T10:48:18","slug":"understanding-the-root-user","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/blog\/understanding-the-root-user\/","title":{"rendered":"Understanding The Root User And How to Obtain It"},"content":{"rendered":"<p>If you&#8217;re new to the realm of <a href=\"https:\/\/webhostinggeeks.com\/best-dedicated-hosting\">dedicated web hosting<\/a>, you may suddenly be inundated with a bunch of terms with which you\u2019re unfamiliar. Believe it or not, there&#8217;s a lot more to web hosting than just disc space, bandwidth, and hardware: The <a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux\" target=\"_blank\" rel=\"noopener\">Linux <\/a>operating system underneath comes with a heap of terminology you&#8217;ll have to become acquainted with, as well as many different quirks and methods that must be learned about.<\/p>\n<p>Don\u2019t sweat it, though, Grasshopper. We understand what you\u2019re going through, and to help you out, we&#8217;ve got a guide to one of Linux&#8217; most important aspects ready to go: If you&#8217;re confused about what the root user does, keep reading. All is revealed in full detail just after the break.<\/p>\n<h3>So What is Root?<\/h3>\n<p>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 &#8220;root&#8221;) 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&#8217;ll want to dip below the surface and tap into the core of things.<\/p>\n<h3>Why Should I Care About The Root? Do I Need It?<\/h3>\n<p>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\u2019s 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.<\/p>\n<h3>How Do I Go Rooting?<\/h3>\n<p>Simple! In most Linux systems (<a href=\"https:\/\/www.redhat.com\/en\" target=\"_blank\" rel=\"noopener\">Red Hat<\/a>, <a href=\"https:\/\/www.suse.com\/\" target=\"_blank\" rel=\"noopener\">SUSE<\/a>, <a href=\"https:\/\/www.centos.org\/\" target=\"_blank\" rel=\"noopener\">CentOS<\/a>, etc.) simply SSH to your server shell, and type the following command:<\/p>\n<p><strong>su<\/strong><\/p>\n<p>It&#8217;s that easy! Other distros, like <a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\">Ubuntu Server<\/a>, 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:<\/p>\n<p><strong>sudo<\/strong><\/p>\n<h3>Basic SSH Commands<\/h3>\n<p>Here is a list of some of the more common SSH commands.<\/p>\n<p>[code lang=&#8221;shell&#8221;]<br \/>\n&lt;command&gt; -h                 # The -h flag provides help on a command<br \/>\nls                           # List the contents of the current directory<br \/>\ncd &lt;directory or full path&gt;  # Change to that directory or path<br \/>\ncp &lt;source&gt; &lt;destination&gt;    # Copy the source file to the destination<br \/>\ncp -r &lt;source&gt; &lt;destination&gt; # Copy the source directory to the destination directory<br \/>\nmv &lt;source&gt; &lt;destination&gt;    # Move the source file to the destination<br \/>\nmkdir &lt;directory name&gt;       # Create a new directory<br \/>\npico &lt;file&gt;                  # Edit file in a friendly, easy to use file editor<br \/>\ngrep &lt;text&gt; &lt;file&gt;           # Search for text within a file<br \/>\nwget &lt;URI&gt;                   # Download the file at the given URI to the current path<br \/>\ntar -xz -f &lt;file&gt;            # Un-gzip and un-tar the given *.tgz or *.tar.gz file<br \/>\nrm &lt;file&gt;                    # Delete the file<br \/>\nrm -r &lt;directory&gt;            # Delete the directory and all contents<br \/>\nkillall &lt;program name&gt;       # Kill all running processes of the program<br \/>\nps                           # Show running processes<br \/>\ntop                          # Show running processes in a graphical frontend<br \/>\nnetstat                      # Show all current network connections<br \/>\ndu                           # Show disk usage<br \/>\n[\/code]<\/p>\n<p>Need more commands? I recommend <a href=\"https:\/\/twitter.com\/#!\/david_coe\" target=\"_blank\" rel=\"noopener\">David Coe<\/a>&#8216;s <a href=\"http:\/\/www.sshcommands.co.uk\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.sshcommands.co.uk\/<\/a>, an easy to understand list of SSH Commands (with examples).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re new to the realm of dedicated web hosting, you may suddenly be inundated with a bunch of terms with which you\u2019re unfamiliar. Believe it or not, there&#8217;s a&#8230;<\/p>\n","protected":false},"author":58,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[9,2601],"tags":[23,411,282,648],"class_list":["post-2613","post","type-post","status-publish","format-standard","hentry","category-security-issues","category-webmaster-resources","tag-centos","tag-red-hat","tag-root-access","tag-ssh"],"views":105,"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts\/2613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/comments?post=2613"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts\/2613\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/media?parent=2613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/categories?post=2613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/tags?post=2613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}