Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
In my Ubuntu 21.04 install, my HOME folder contains my user-installed apps, etc. In my Ubuntu 22.10 install, the HOME folder contains a <USERNAME> folder that contains user-installed apps. For the sake of uniformity I want to move all items out of my <USERNAME> folder in 22.10 and up a level into the HOME folder. Is it safe to do so without trashing my user-installed apps? If so, are there any special considerations I should be aware of? Thanks!
It is in general safe, but probably there are config files which will look for your tools in their old locations. In that case you need to adjust all the references and related settings (like your .bashrc).
Thanks for the fast response, pan64. There are numerous folders in my .config folder and I have no desire to re-install my user apps. I have no idea which files would need to be changed to a different home folder location. Also, it seems APT and DPKG install new apps into the <USER> folder so I would have to change that behavior each time I install a new app. It appears to me that moving the apps may be a recipe for tragedy lol.
One day you will need to create a new user to test/correct something. If you have made all the necessary changes, you are really going to regret scratching this particular itch.
Thanks for the fast response, pan64. There are numerous folders in my .config folder and I have no desire to re-install my user apps. I have no idea which files would need to be changed to a different home folder location. Also, it seems APT and DPKG install new apps into the <USER> folder so I would have to change that behavior each time I install a new app. It appears to me that moving the apps may be a recipe for tragedy lol.
I do not use Ubuntu, but usually all apps are installed systemwide, why are dpkg and apt installing into /home/<user> ? Just curious.
What I meant to say was that some packages install folders in the <home/user> folder. Apt apps and dpkgs are indeed installed systemwide. It would be pretty much impossible to determine where all my apps install their data. So, I'm gonna let sleeping dogs lie and leave it all as is. Thanks to all who responded!
It would be pretty much impossible to determine where all my apps install their data.
What kind of data is this? There is filesystem hierarchy standard, it determines where the binaries go and everything else. System-wide configuration files go to /etc/*, in case user has their own config it goes to ~/.config/*. Databases go to /var/*, so on. See 'man hier'. You will find a Linux system is well organized and everything has its place.
You will find a Linux system is well organized and everything has its place.
Yep, and historically, from the beginning, each users home directory has been located at /home/user. Attempting to change that would quickly become a nightmare to manage. The OP said he will let sleeping dogs lie, which is probably a good thing.
A benefit of moving a user's home directory to /home is less typing, but there are ways to reduce typing without incurring the disadvantages of putting files in /home.
When in a command-line shell, one can usually use "$HOME/whatever" instead of "/home/username/whatever".
There's an even shorter shortcut that also works outside a shell, which is "~/whatever"
The ~ character is called "tilde", and is in different positions depending on keyboard layouts - US QWERTY has it to the left of 1 (below Esc), as shift-`, whilst UK QWERTY has it next to Enter, as shift-#, (and other layouts may have it in other places).
If the keyboard doesn't have it, or pressing shift is annoying, one could potentially symlink /me -> /home/username and use "/me/whatever" instead.
Also, a slight aside going in the other direction, "/home/username" is only the default - the FHS does not require this, and with a large userbase one might want to use, for example, "/home/department/username" or similar. (Also, other Unix-based systems may use other locations.)
Doing so might break badly written scripts (if they use "/home/$USER" instead of "$HOME"), but it is a permitted choice:
Quote:
Originally Posted by man hier
/home
On machines with home directories for users, these are usually beneath this directory, directly or not. The structure of this directory depends on local administration decisions (optional).
Quote:
Originally Posted by FHS v3
[6] Different people prefer to place user accounts in a variety of places. This section describes only a suggested placement for user home directories; nevertheless we recommend that all FHS-compliant distributions use this as the default location for user home directories. Non-login accounts created for administrative purposes often have their home directories elsewhere.
On smaller systems, each user's home directory is typically implemented as a subdirectory directly under /home, for example /home/smith, /home/torvalds, /home/operator, etc. On large systems (especially when the /home directories are shared amongst many hosts using NFS) it is useful to subdivide user home directories. Subdivision may be accomplished by using subdirectories such as /home/staff, /home/guests, /home/students, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.