首先打開(kāi)/etc/sudoers文件,找到下面一行,并在root下面添加一行,如下所示:
## Allow root to run any commands anywhere root ALL=(ALL) ALL tommy ALL=(ALL) ALL
(在線學(xué)習(xí)視頻推薦:linux視頻教程)
修改完畢后,現(xiàn)在可以用tommy賬號(hào)登錄。
然后用命令 su ,即可獲得root權(quán)限進(jìn)行操作。
相關(guān)教程推薦:linux教程