Centos8 普通用户赋予管理员root权限 *1) 以root用户查看 cat/etc/sudoers 2)此时这个文件只读文件,将其更改成可写状态 chmod 777 /etc/sudoers 3)添加内容到文件内 Allow root to run any commands anywhere root ALL=(ALL) ALL test ALL=(ALL) ALL 4)再将root用户文件改为只读 chmod 440 /etc/sudoers 5)重启电脑 reboot 6)使用sudo+命令即可