Linux切换用户/超级用户权限

  • 在Linux操作系统(CentOS8)上安装yum工具时出现了问题
  • 错误为:Error: This command has to be run with superuser privileges (under the root user on most systems).
  • 大意是错误:此命令必须以超级用户权限(在大多数系统上以root用户权限)运行。
  • 所以当前的用户是普通用户,需要切换为超级用户(root用户),如何切换超级用户呢
  • 先输入在命令行中输入su root
    然后会出现Password:,你需要输入root用户的密码,为了保证安全性,你输入的密码是看不到的,但是不用担心,因为你输入的每一个字符都在里面,然后就可以登录root用户了,如果密码输入错误导致没有成功登录超级用户,那就在输入一次su root,然后在输入密码就可以了
  • 原文链接:https://blog.csdn.net/qq_42449963/article/details/106990374

你可能感兴趣的:(学习心得,Centos,8,linux,用户权限)