Ubuntu – How to open a folder as root

nautilusroot

More specifically the

/etc/apt/

folder. I need to delete some files and replace

/etc/apt/sources.list

with a newer version.

Best Answer

  • To open the folder as root in the grapical file manager, run the following command:

    gksu nautilus /etc/apt/
    


    If you wish to do your operations from the command line, the following command enters the intended directory and makes you root. However, you would be better off using the first method above.

    cd /etc/apt; sudo -i
    
  • Related Question