Debian common users get root permissions | sudo installation and configuration

Source: Internet
Author: User

Debian common users get root permissions | sudo installation and configuration

When a common user of the Debian system needs to install the software, he or she will often receive the "Permission denied" prompt. In this case, he or she needs the root Permission. So how can I have root permissions without logging on to the super Administrator account? For most Linux systems, we can use the "sudo" command to obtain root permissions, or log on to the super Administrator account using "su" to perform various operations that require root permissions.

However, the Debian system does not seem to have sudo installed by default, so the following describes how to install sudo and configure its sudoers file"

  1. Log on to the super Administrator Account, Enter the su and Enter keys in the Terminal command line, and Enter the super administrator password to Enter the root account.
  2. Enter the command apt-get install sudo, "Enter", and the system will start to install sudo (because sudo has been installed on my side, only the installed information will be prompted)
  3. Enter the adduser yl sudo command and press Enter.
    This means to add my username yl To The sudo group. You can add your username to the sudo group based on the actual situation.
  4. Next, configure the sudoers file, which is written in the vi editor.
    -Enter the command vi/etc/sudoers to enter the sudoers file;
    -In vi command mode, enter/% sudo to search for % sudo ALL = (ALL: ALL) ALL, or manually locate
    -In vi insertion mode (press the I Key), enter yl ALL = (ALL: ALL) ALL (same, here, yl represents my normal user name. You can modify it based on your needs)
    -In vi command mode, enter x to exit vi and save the file.
  5. Verify that sudo is successfully installed
    Restart Terminal, enter the command sudo ls, and then enter the user password. If the following words are displayed, the installation or configuration of sudo may fail. Repeat the preceding steps;
    Yl is not in the sudoers file. This incident will be reported.
    If the following words are displayed, The sudo installation and configuration are successful.
    Desktop Documents Downloads Music Pictures Public Templates Videos

This article permanently updates the link address:

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.