I have a fresh installation of Ubuntu 22.04. When I click on the 'Files' icon in the GUI dock the initial view defaults to showing the default directories my Home directory, i.e. Documents, Downloads and such like. I can understand why some people might want that but I don't. I'm learning about Linux and Ubuntu, and to gain familiarity with the directory hierarchy I would prefer the initial view to be of the root directory - such that I see directories such as bin, boot & dev. I know I can navigate there by clicking on 'Other Locations' and 'Computer' but that gets tedious after a while. Is there anything I can do to set the default location to the root directory? (I found an answer to this that's nearly ten years old now, and I cannot see the Nautilus file that it says must be edited at the location stated).
After a little experimenting I figured out how to do this. In /usr/share/applications create a new text file called 'root-files.desktop' and put the following text in it:
This will create a new entry in 'Show Applications' called 'Root'. Right-click on it and 'Add to Favourites'. A new folder icon just like the existing 'Files' icon will appear in the dock. Clicking on it opens Nautilus with the view that I wanted.
The operation of this icon is slightly different to that of the 'Files' icon because it always opens Nautilus at the '/' folder, whereas the 'Files' icon only opens it at Home if there is no instance already running. If one is already running it will open that instead - and that might not be at Home.
To create an icon that will always open at Home use the same method as for the 'Root' icon above. Name and edit it accordingly and point it to Home.
Please don't do that. For the most part, you only need temporary root access, such as updating/upgrading system software and other applications,whether you do so via a command line in a terminal window or with a graphical user interface. And you're always prompted for your superuser (sudo) password before the OS lets you proceed.
Without a comprehensive understanding of Linux,roaming around root with root access makes it possible - and probable - that you'll unintentionally do irreparable damage to the operating system and any other data stored on your device. If that data is critical, sensitive or important to you and you have no way to restore it . . . Experienced system administrators don't even give themselves root access except when absolutely necessary.