Introduction and main usage of su command First, we need to explain what su means. I always thought thatsuwas a super user, but afterinformation, I realized that it meant 1617f583ec877a switch user. After knowing the abbreviation of su, the function it provides is obvious, which is to ...
"Su" stands for "substitute user" and is used to switch to another user, while "sudo" means "superuser do" and grants permissions to execute a command as another user.
Because becoming root withsumeans that you are root, which is the same as logging into a terminal as the root user with root's password. And that's dangerous for many reasons. [ You might also enjoy:Linux command line basics: sudo] Working as root means that you have the power to: R...
Note:Staying logged in as an administrator compromises security. Admins used to run thesu(substitute user) command to temporarily switch to an administrator account. However, thesu commandrequires a second user account and password, which isn't always feasible. Environment Variables Used by sudo En...
Su is a command-line utility and stands forswitch userorsubstitute user. Like sudo, the utility enables a user to run commands under a different account. However, sudo has some important advantages over su. The sudo command enabling a standard user to create another user account. ...
If a normal user needs to perform any system wide changes he needs to use either ‘su‘ or ‘sudo‘ command. Linux: su v/s sudo NOTE– This article is more applicable toUbuntubased distributions, but also applicable to most of the popularLinuxdistributions. ...
User_Alias USER_SU = test, test1 Cmnd_Alias SU = /bin/su USER_SU ALL=(ALL) NOPASSWD: SU 或者下面三行: User_Alias USER_SU = test, test1 #Cmnd_Alias SU = /bin/su USER_SU ALL=(ALL) NOPASSWD: /bin/su 保存配置文件后,使用test, test1, 三个账户登陆Linux后,执行命令 sudo su - 切换...
一、命令su 语法: su [-] username 后面可以跟 ‘-‘ 也可以不跟,普通用户su不加username时就是切换到root用户,当然root用户同样可以su到普通用户。 ‘-‘ 这个字符的作用是,加上后会初始化当前用户的各种环境变量,做个简单的实验来说明加与不加 ‘-‘ 的区别: ...
This means that you cannot login as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users (normally "Administrati...
s environment. This means that commands do not need to be quoted any differently than they would be without using sudo. Note that this behavior can be overridden by specifying various options. Note, too, that sudo can be used to start an interactive superuser session (much like su -) by...