Welcome to the new Linux Foundation Forum!

Root privileges during exam

justinnoorjustinnoor Posts: 7
edited January 6 in LFS201 Class Forum

The LFCS preparation guide pg.18 says that root privileges in the exam terminal can be obtained by entering 'sudo -i'. So anytime we run the sudo command we have to include the '-i' flag?


  • coopcoop Posts: 280

    I do not know and it may depend on the platform used. These kinds of questions should be directed to the certification help staff, for which you should have a link, if you want to get an authoritative answer as any thing else may not be 100 percent right.

    You should try the following two commands:

    sudo ls -l
    sudo -i ls -l

    and see the difference. AFAIK, it is whether root's shell init files are read in and the current directory reset etc, kind of like su vs su - .

  • Hi justinnoor,

    As coop said, you should ask the certification help staff. But running 'sudo -i ' won't hurt a bit, as it's a way to ensure that you are running commands under a certain command environment (root's in this case). You can confirm this by seeing the sudo man page where it's explained.


Sign In or Register to comment.