3

In the Root folder/directory, Shall we allowed to create some New folders which can have files like Videos, Doc, Software packages, etc?

During installation ubuntu has created many folders with Root. Will it have any side effects if we create some additional folders?

(In Windows C drive, i had this kind of file management. Since i am just beginner to Ubuntu, i want to check any concerns available with linux environment)

3
  • On my own system, I have some network shares off / as I'm too lazy to use the default /mnt/ (where most of my files actually are) which is fine for most programs and is my preference (I save typing "/mnt" or 4 characters each time). Some programs (esp. snap packaged programs) have issues with it, so I have a second mount point in /mnt/ for those programs) so you can have whatever you want.. but there are pros & cons to any choice... Havig directories in / may have issues long term come upgrade time (/home is treated differently by some programs, like /media, /mnt for snaps) – guiverc Apr 16 at 6:39
  • 1
    "Shall we allowed to create some New folders which can have files like Videos, Doc, Software packages, etc?" ---why---? There is no reason to do this and there are better locations for anything you want to do in /. 1 thing: if you take your windows ideas to linux you are not going to like linux. Please approach Linux as what it is: a MULTI-USER operating system. Keep user related files in a user related directory. If you want multi-user directories you put those in a mountpoint. – Rinzwind Apr 16 at 7:43
  • "there are better locations for anything you want to do in /" -- Can you please tell those locations/folders which can be used in root? – Murugesh Apr 16 at 9:07
4

In principle, you can have folders in the root file system (/) for data without affecting or damaging system operation (apart from the fact that you risk damaging the file system if you commit an error while attempting to create folders). However, it is not elegant practice.

There is an agreed-upon file hierarchy standard in linux. /mnt traditionally is just a quick mount point for a temporary file system. /media is where removable media are mounted. Except for /home, all other folders essentially host system files. How /home is implemented is, however, not defined by this agreement. So that would lead me to conclude that any user data that is not on separate partitions belongs somewhere under /home.

User data in first instance resides under the user's home folder, which commonly is /home/<userlogin>. Thus, if you are the only user of that system, store "Videos", "Doc" etc under your home folder, preferably even in the folders that in an Ubuntu install are foreseen for that purpose.

If there is data you want to share with multiple users, I would recommend creating a folder /home/data, and then put your folders "Videos", "Doc" etc there. You can use symbolic links to create very convenient access to these folders for each user that needs it. Symbolic links act and feel like real folders, and allow you to create a folder in the home directory of the user that seamlessly brings the user to another part of the file system hierarchy. Of course, you may need to adjust permissions and groups of these folders to grant the users .

With respect to "Applications", stick to the maximum extent to software provided through the APT software management system of the distribution, or alternatively, to software from snap (available by default in Ubuntu), or flatpak or appimage. Other ways to get software may incur a risk to break the system, entail technical knowledge, or increase the risk to be exposed to malware.

0

The short answer

In the Root folder/directory, Shall we allowed to create some New folders which can have files like Videos, Doc, Software packages, etc?

  • Yes, if you have the privilege.

Will it have any side effects if we create some additional folders?

  • No, it is just another directory.

In Windows C drive, i had this kind of file management.

  • That kind of behavior is discouraged even on Windows when used in a multi-user environment.

The WWH (what, why and how) answer

System admins might create and utilize additional directories under the root directory / for various reasons... e.g. file sharing, FTP, quarantining... etc.

Some device manufacturers e.g. routers, camera systems, IOT devices... etc might do this as well.

However, following the Ubuntu / Linux / Unix directory structure is a good practice. This structure has been around for a long time to the extent that it is taken into consideration when building, installing and running applications, system services, scripts, maintenance, backups and even troubleshooting... Some environment variables like $HOME are an implementation of this concept.

Yes, it is just a concept... but, this concept (structure) has been widely accepted and taken for granted as the standard directory structure for *nix systems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.