debian使用sudo

debian默认没有sudo ,在命令前无法使用sudo
#切换到根用户$ su 输入根用户密码

# apt-get install sudo
# nano /etc/sudoers

文件的 User privilege specification 部分添加:

debian ALL=(ALL:ALL) ALL

将 debian 换为您的用户名

C-w 保存
C-x 退出nano


第一次使用sudo的提示如下:

jb@e3v2:~$ sudo apt-get update

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for jb:

原文地址:https://www.cnblogs.com/vipzrx/p/3520027.html