Linux What is root and What is root user the different

 

On Linux What is root and What is root user the different.

 

   They always talk about root... What is root and who is the root user?  This simple short article intend to show the diffrents between both root on Linux system.

 

Who root user.

 

   On Linux system or any other system that require login username and password in order to use the system must have sets of default user on the system... this usually come on the installation of the system.  

 

Take Windows system as an example, the user Administrator is the default user that have the ability to maintain the Windows system itself... and back to the Linux system we have root user that have full ability to maintain the Linux system.. this root user automaticcally created when you install the system... the installation system usually only ask you to key in password for this root user.

 

This root user always use the username:  root  and the root password that you supply back in the installation process. 

 

The root user always have uid 0 and gid 0, the command example below show how to become root user and show the user id and group id that own by rooot user

 

Execute su - command to change to root user:

[jason@localhost ~]$ su -

Password: 

[root@localhost ~]# 

 

Execute id command to show root user id and group information:

[root@localhost ~]# id

uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[root@localhost ~]# 

 

 

What is root ( / ) or some say root directory.

 

   The root we talk this time is the Linux filesystem hierarchy... the way of your system organize the data inside the system.  The root ( / ) is the core or root of the directory and files on your system...  This is little bit diffrents with Windows... on Windows you always have the c:\ drive and so on.. for more information you can always refer to wiki and fhs site.  

 

To view the graphical directory tree from the root directory execute the command example below on your Linux shell.

 

[jason@localhost ~]$ tree -L 1 /

/    <-- root directory

├── bin

├── boot

├── cgroup

├── dev

├── etc

├── home  <-- user home directory

├── lib

├── lost+found

├── media

├── mnt

├── opt

├── proc

├── root   <-- root home directory

├── run

├── sbin

├── selinux

├── srv

├── sys

├── tmp

├── usr

└── var

 

21 directories, 0 files

[jason@localhost ~]$ 

 

 The output from tree command above show you the root (root directory) ( mark by " / " ) and the other directory that have root directory name is the root home directory where the root use store his/her data files

 

Keywords: linux root, linux root directory, linux root user, root, root directory, root user