Switch Ubuntu to a Super User

Source: Internet
Author: User

I. sudo su (Note: There is no bar above the command)

The following error occurs: root @ ubuntu:/home/jie #

Ii. Enter the root password for sudo-s (Note: There is a bar in front of the command)

Root @ ubuntu :~ #

In linux commands, root @ ubuntu:/# And root @ ubuntu :~ # Differences:

Root @ ubuntu:/# This is the root directory, which is read-only to general users. root users have all Permissions

Root @ ubuntu :~ # This is the home directory. Each non-root user has his/her own home directory.

----------

/Indicates the root directory. # indicates the root user. Both of them indicate that you use root to log on to the current directory as the root directory.

One is location, and the other is permission.


The linux directory structure is tree-like, and the top directory is/, any other File System (disk partition, and memory file systems such as/proc/sys) all must be mounted under this Directory, which is a directory under it. When linux is started, you can set the mount point as the root partition to/when installing the system. If you also set a partition mount point as home, then it will be mounted to the home directory under.

You are in ~ Run pwd

If you are a common user, your ~ The directory is/home/your_name/. This is your website and you can do whatever you want, but out of this directory, you only have read-only permission.

If you are a root user, your ~ The directory is/root/, with unlimited permissions

 

~ There are some configuration files in the directory that only target your user, which is equivalent to your personalized configuration. Like windows, my documents are very bad.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.