I’ve just been getting up and running with a minimal distro lately and also discovered
user-dirs.dirs, so I’m no longer bound by the standard auto-generated Home folders.
Looking to share and learn how other comrades organise their home directories. Any tips appreciated, and also just seeing how other people like to use and organise
Here’s how I’ve organised
~/ on my new install so far:
* audio/ * audiobooks/ * music/ * podcasts/ * books/ * documents/ * dotfiles/ * downloads/ * images/ * photos/ * screenshots/ * wallpaper/ * opt/ * planner/ * projects/ * scripts/ * videos/ * workspace/
… plus all the hidden cruft that’s placed in home by various programs. I do my best to enforce the XDG_CONFIG_HOME standard but I’m still in the process of moving stuff into
Most of these are self-explanatory.
opt/ is for software I build from source or otherwise not available in my package manager.
planner/ is a git repo full of plain text and markdown files used to manage productivity and take notes.
projects/ is my personal git repos containing stuff like my blog, creative writing etc.
scripts/ is part of my $PATH and contains executable helper scripts such as setting a random wallpaper, fetching mail, etc. It’s also a git repo.
workspace/ is actually the
XDG_DESKTOP_DIR but renamed. My window manager doesn’t put files/folders on the actual desktop so I use this space for repos I contribute to for my job as well as transient tasks which require a folder structure for getting something done but which will likely be removed later. Basically stuff that’s not an actual personal “project” and I’m working on at the moment.
Things I’m thinking about:
downloads/. There are three folders which start
domeaning tab-complete only works on the third letter. Not ideal. I’ve seen some people use
incoming/but I keep flip-flopping on whether I like this or not.
.dotfiles/but then, I use it a fair amount at the moment.
articlesfolder for academic articles and HTML blog posts I want to keep locally.
A Community for all leftists wanting to join and being part of a community that talks about Linux, Unix and the Open-Source Community
I basically use the default except that I soft-link other file systems to home; ~/hrd/ then soft-link various files where they’re relevant. I don’t use downloads on home but from an HDD which is subdivided based on source and treated as a raw dumpsite. From there I’ll hard-link and rename files to relevant locations.
Wow that seems like a lot of work with all the linking. Do you have any scripts or use GNU stow to set up your links for if you do a wipe or a fresh install? Or is /home on its own partition?
Also if you delete or rename major default directors like “downloads” programs will create a new directory under the old name if they default to it.
If you really don’t want to type the third letter have one uppercase and one lowercase. That would be enough
Thankfully none of the software I use does this. They either follow the XDG standard or let me set it manually before I downloaded anything (Firefox).
It’s not a lot of work.
Now if I want to get to the hard drive I can do it from the home directory.
If your downloading something you wouldn’t just leave it in a download directory. You’d want to organize it anyway. It doesn’t hurt anything to cp -l or ln rather than mv.
If it’s a torrent file, it can’t be moved from the directory and still be available to seed.
If your working on something that are otherwise organized somewhere else, it’s a lot easier to have those files all in one directory. Why not just soft or hard link to a single working directory.
I use default partitions. You’d set up a script to do the same thing multiple times under the same conditions. I’m not deleting and recreating my filesystem every other week, or at all for that matter.
Ok when you put it like that, that’s a lot less work! I might symlink the
/mntmountpoints to home at some point.
From your previous comment I picked up on “From there I’ll hard-link and rename files to relevant locations.”, which sounded like you did a lot manually. Obviously the ln command is quite easy to just fire off, but I must’ve misinterpreted because it I thought every time you downloaded something you’d symlink it manually.
I generally will do a lot manually, say I download a movie using transmission. Those torrent files are under ~/hrd/downloads/transmission
I have to leave that file there exactly as it is for it to seed, but I don’t want it there, I don’t like it’s name, and I don’t like the extra files.
Now I have two files of the same inode (taking up a single amount of physical space), one readable and one serving the purpose of seeding.
I wouldn’t do this for everything but for things I want to keep more permanently.
It also serves another purpose: I can delete the file from the Transmission directory and it will still exist in the Movie directory, since an inode isn’t overwritten unless it has zero files pointing to it, so hard-linking provides an extra level of redundancy to prevent accidental erasure.
This is also useful for indexing and creating playlists.
I’d be careful with /media since /media isn’t automatically mounted on boot, and is customarily used for temporary filesys. If you soft-linked to media the link would appear broken if the device was missing, usb, cd, external. If you have a permanent drive in media you should move it to mnt.
# find /dev for /media – dev/sda2 mounted at /media/“user”/“name” –
# For instance
Alternatively use the gui. Mine is called “disks” and works well.
If you prefer bash it’s important that you make the directory you intend to mount the device to first, as you can only mount to an existing, empty directory.
But soft-linking to media will end up with broken links, which, at the very least, will look ugly.
I basically just use default. Or rather, I don’t store almost anything in
.configand few local binaries. Almost everything else is organized on my home server. There I have everything I downloaded sorted in
media/music. Where it is automatically put by Sonarr/Radarr/Lidarr or in case of music downloaded from soulseek and then imported with beets. Then I just differentiate between work projects and personal projects. Plus some randomly created norg files for organization (I really have to create proper system for them).
Ah nice. My media (tv, movies) does live on an external drive. I use
videosfor family videos such as ones we upload from a phone or camera.
user-dirs.dirs? I only know
/etc/skelas template for new user dirs
user-dirs.dirsis a file that lives in
$HOME/.config/user-dirs.dirsand contains your user-defined values for the XDG user directories standard. The Arch Wiki Page is a good summary. Basically common directories such as
If you’ve got
xdg-user-dirs-updateon your system, it’s run on login and creates the directories specified if they don’t exist. Programs can then read this config file to do things such as placing downloaded files in your user-specified equivalent of
Downloads. Another use case is file managers drawing special icons for
Here’s my file, related to my folder structure above:
I don’t need the
Publicdirectories, so I just map these directly to
$HOMEto prevent them being auto-created. There may be a better or cleaner way, but I found that even if I omitted the line or commented them out the default
Publicdirectories would get created.
Nice, thanks for the explanation🙂✌️
You’re welcome, comrade! :-)
For some reason, my brain just doesn’t like having folders in my home directory that don’t start with a capital letter.
My home directories look something like this:
Codecontains the git repos of any projects I’m working on
Code/AURcontains my AUR packages
Desktopis pretty much unused, but it was created automatically so it’s there
Documents/Nextcloudis the directory that’s synced to my Nextcloud instance
Workspaceis where I experiment with random stuff that usually doesn’t last long. If it does, I move it to
Everything else should be pretty self-explanatory.
That’s fair. It never used to bother me at all but as I tend to do most stuff on the terminal these days I’ve wanted to keep everything more consistent. First the spaces bothered me, then the capitals :-P But having home folders with capitals feels like a nice exception as it is a relatively special folder.
I like how clear
Applicationsis. It’s also cool how you’ve got the Nextcloud folder underneath
Documents, very tidy.
deleted by creator
deleted by creator