I realized I always make a source folder under home and then subfolders named after programming languages to organize projects but then I realized I somehow had my own convention for how to store my source code and I have no idea where I got it from

Then I thought. what about other Linux users ?

What sorts of conventions do you have that pertains to folder structure in Linux ?

top 100 comments

sorted by: hot top controversial new old
[–] 29 points 11 months ago (11 children)

My homedir is an infernal hellhole of junk accumulated over the past 15 years and I wouldn't have it any other way

  • source
  • hideshow 11 child comments
  • [–] 14 points 11 months ago (5 children)

    I'd love to keep it clean but too many devs think $HOME is up for grabs, as long as they prepend their directory names with a dot (they think I'll never notice, but I notice, and I keep a list...)

  • source
  • parent
  • hideshow 5 child comments
  • [–] 7 points 11 months ago* (4 children)

    Dafuq are you doing in other people's homes?

    Sysadmins are all creeps, confirmed

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 11 months ago* (3 children)

    Breaking pots. Don't mind me.

    EDIT: holdup, who are you calling a sysadmin? I administer my system, sure, but that's about as far as I'm willing to go, thank you.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 11 months ago (2 children)

    Breaking pots.

    TriangleSpecialist

    Are those the Triforce triangles perhaps?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 11 months ago

    Mine used to be the same but the last OS reinstall I reset everything, moved my files onto an external drive, and only copied them over on a needs basis. I'd been keeping the same home dir since I was like 4 or however old I was when I started using a computer. So needless to say there was a lot there that made me cringe to see every time I tried to navigate my files.

  • source
  • parent
  • [–] 4 points 11 months ago (1 child)

    I just prepend everything in the home directory with a dot every 6 months or so, no problems so far

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 11 months ago

    You can also just make a file called .hidden and paste the names in there and it'll hide them, that way it doesn't mess up any paths/symlinks etc. Or at least in KDE/Dolphin you can do that, I dunno about other setups.

  • source
  • parent
  • [–] 28 points 11 months ago (8 children)

    Multiple people in this topic say they organise in directories for different programming languages, something I have never considered and I find it to be an odd way of organising for some reason I can't explain.

    Where do you put a project with a Javascript frontend and a Python backend?

  • source
  • hideshow 8 child comments
  • [–] [S] 5 points 11 months ago (5 children)

    for me I consider that a web project so it goes into the typescript folder, if it's backend only then python

  • source
  • parent
  • hideshow 5 child comments
  • [–] 11 points 11 months ago* (4 children)

    Why group it into language instead of say a 'web' directory or 'android'/'mobile'?

    I'm just curious, I am more of a 'throw everything in one directory and home I remember what I'm looking for' sort of organiser.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 11 months ago (1 child)

    Honestly it's a pretty good way of compartmentalizing projects in your mind.
    You usually remember pretty well what language your wrote a project in.
    And if you want to find a project again you just have to look in that language's directory.

    Second advantage is that if there's a language you only fucked around a little for fun, it doesn't clutter the directories of your most used languages.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 11 months ago*

    Since projects of the same language often use the same tooling this makes it easier to clean up the whole directory by running something like this:

    for d in ./*/ ; do (cd "$d" && somecommand); done
    

    somecommand could be cargo clean if you're in the Rust directory for example.

  • source
  • parent
  • [–] 28 points 11 months ago (3 children)

    My home folders on any OS have a Development folder (which conveniently sits right next to Documents and Downloads) and in that folder, I’ve also got subfolders per programming language that have the respective projects in them.

    The other folder I usually have is SyncThing with whatever synced folders are relevant for that machine.

  • source
  • hideshow 3 child comments
  • [–] 26 points 11 months ago

    ~/3D Objects

  • source
  • [–] 21 points 11 months ago* (4 children)

    ~/Homework (porn)

    ~/aaaaaaa (porn)

    ~/Stuff (memes, with a porn subfolder)

    ~/misc (work docs, study docs, forms, some porn)

  • source
  • hideshow 4 child comments
  • [+] 9 points 11 months ago (2 children)
  • [–] 1 point 11 months ago*

    I could be wrong, but it seems he just mounted '/porn' directly as '/' ? Efficient, I guess.

    ..actually, there seem to room for more improvements; I'm not sure there's any need for an 'operating system' on the system - a small fap-app (tm) could likely handle all content on the system ? Work documents could be injected in to the fap-stream (c) when he needs to stop ? That would release many gb for even more fap-ability (c) ?

  • source
  • parent
  • load more comments (1 reply)
    [–] 15 points 11 months ago (2 children)

    At least two of these:
    ~/Stuff
    ~/Stuffs
    ~/Stuffz
    ~/Shits

  • source
  • hideshow 2 child comments
  • [–] 12 points 11 months ago* (last edited 11 months ago)
    • /ram - tmpfs filesystem
    • ~/.local/bin - added to my path
    • ~/.local/software - any user-local program more complicated than a binary gets a directory here. Generally a binary would be symlinked to ~/.local/bin
    • ~/.local/venv - shared python venv to use for one liners and small scripts
    • ~/repo - local filesystem backed package repository for which the host system is configured to install from
    • ~/.local/repo - local filesystem backed package repository for which the host system is not configured to install from (used for mock, VMs, and external systems).
    • /overflow - Used to point to a large secondary hard drive (back when having a small ssd was the economical thing to do. Nowadays, it is just where my large directories go cause I can't be bothered to get used to a more sane setup
  • source
  • [–] 11 points 11 months ago (7 children)

    I have /home/username/username/ and I sym link important dirs (like Downloads) to my new home. I strongly dislike all the dot files and dirs cluttering up my home dir.

  • source
  • hideshow 7 child comments
  • [–] 9 points 11 months ago (6 children)

    Are you aware of the ‘xdg-user-dirs-update’ command that allows you to edit the ~/.config/user-dirs.dirs config file?

  • source
  • parent
  • hideshow 6 child comments
  • [–] [S] 5 points 11 months ago (4 children)
  • [–] 9 points 11 months ago (1 child)

    Not the commenter you replied to, but I change my XDG directory names to be lowercase and start with different letters. For example, Desktop, becomes "drop" (as in pick it up and put it somewhere else) and Downloads is a subdirectory dl. A program that would otherwise save to "Downloads" now saves to "~/drop/dl". When I setup my machines I run a script including the line xdg-user-dirs-update --set DESKTOP "drop" to update the XDG directory and I delete "Desketop". So og commenter has the option of updating their userdirs to be nested in their username if they wanted to avoid symlinking. Here's the relevant arch wiki page and xdg freedesktop page.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 11 months ago

    Reading back, my comment sounds snarky, but I was genuinely trying to be helpful.

    Like what pemptago was describing, instead of symlinking your directories to /home/username/username, you could simply update that file and achieve the same effect, but in a more “official” way that may prove more robust.

  • source
  • parent
  • [–] 9 points 11 months ago

    ~/proj
    ~/note
    ~/sync
    ~/docs (/book etc)
    ~/imgs ~/util ~/test ~/temp

  • source
  • [–] 8 points 11 months ago (3 children)

    Hardware folder (synced via sync thing). All hardware PDFs, notes images etc get subfolders by manufacturer. It is helpful for keeping track of use manuals, firmware or config settings for each piece of hardware.

  • source
  • hideshow 3 child comments
  • [–] 3 points 11 months ago

    I have a ~/Sync folder with a symlink to all my Syncthing shares, which I have quite a lot of. Helps me find them quickly and reminds me that everything in there us pulled or pushed somewhere else.

  • source
  • parent
  • [–] 8 points 11 months ago (3 children)

    ~/dev for code
    ~/work for things I don't want to do, like taxes

  • source
  • hideshow 3 child comments
  • [–] 8 points 11 months ago

    Archive

    Archive archive

    Archive_11_2025

    I am not good at organizing

  • source
  • [–] 8 points 11 months ago

    ~/ linux iso's

  • source
  • [–] 8 points 11 months ago

    I just live out of my downloads folder until its time to back up the important stuff to the server and reinstall/ distrohop.

  • source
  • [–] 7 points 11 months ago

    I always make a bin folder in my home for putting my custom scripts and downloaded binaries. At least on fedora, ~/bin is already in the path, so I don't have to make any additional configuration to make stuff in there become commands for my cli

  • source
  • [–] 6 points 11 months ago (1 child)

    ~/autoclean and a cron job to delete everything older than 7+ days from there. I can just download whatever, throw it in a special folder and it's gone after few days. Keeps my ~/Downloads a bit more clean, easy to store temp txt files to keep track of what I currently have on hand and so on.

  • source
  • hideshow 1 child comment
  • [–] 2 points 11 months ago

    I remove files and folders older than 30 days in my Downloads folder. But my work does make me download things that I often only need for less than a day. If I need to keep something, then it goes into whatever folder or online service where it should be. It is deleted to my trash bin and that has another 30 days before being permanently deleted. I haven't had to pick anything out of the trash just yet.

  • source
  • parent
  • [–] 6 points 11 months ago*

    ~/.drafts, in which my text editor taskbar shortcut script creates files YYMMDD_text_N. I passionately believe in eliminating the chore of manually naming my spur-of-the-moment notes and text files.

    ~/progs or ~/bin where loose programs not provided by my package manager reside.

    If there's a secondary drive, /media/disk1 as the mount point in fstab.

  • source
  • [–] 6 points 11 months ago*

    I rsync my home folder across installs. These are my standard extra folders.

    ~/Books, with subfolders by topic.

    ~/Comics, with subfolders by publisher, then by title, possibly with an intermediate folder for author or franchise.

    ~/Programming, with subfolders by language, then project.

  • source
  • [–] 6 points 11 months ago
    [–] 6 points 11 months ago*

    ~/Projects - for my coding projects

    ~/Qt - which holds the Qt framework

    ~/Torrents - For torrents that I share

  • source
  • [–] 5 points 11 months ago (1 child)
  • [–] 6 points 11 months ago* (last edited 11 months ago)

    I usually create ~/git/{github,gitlab,codeberg,AUR,etc} where I clone the git stuff I need.

    The rest is usually handled by my nextcloud that creates the ~/Nextcloud folder.

  • source
  • [–] 6 points 11 months ago (4 children)

    I always make a ~/.local/{bin,opt,share} if the distro lacks it. and a ~/bot that I use for my development stuff

  • source
  • hideshow 4 child comments
  • [–] 6 points 11 months ago (2 children)

    Your organization will vary with your usage. If you're looking for something suitable for work, I would highly recommend the PARA approach. https://fortelabs.com/blog/para/

    I've tweaked it to my needs. Combined with fzf, it makes my workflow so smooth and efficient. https://www-gem.codeberg.page/sys_stay_organized/

  • source
  • hideshow 2 child comments
  • [–] 6 points 11 months ago (1 child)

    I want to follow this, and I sorta do... but ADHD makes the P,A and other A basically the same category. And the R is just "stuff I put down to look at but haven't yet".

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 11 months ago (1 child)

    Projects for all kinds of projects

    aur_builds for the package I use from the AUR. No hand holding here, I build and install my AUR packages artisanally.

  • source
  • hideshow 1 child comment
  • [–] 5 points 11 months ago* (1 child)

    ~/diy for my collection of knitting, crochet and sewing patterns and other assorted diy stuff

    ~/work duh.

    ~/tools for my collection of more or less useful small scripts

    ~/sync for my syncthing folders

    ~/data symlink to my data partition (most of the others are also symlinks to their location on data)

    I don't really have a convention for programming projects yet. They used to land inside of ~/diy or in ~/tools or just random folders on data. I've got a ~/code folder now, but its contents are a mess.

  • source
  • hideshow 1 child comment
  • [–] 5 points 11 months ago*

    ~/Brojetos (anything relating to making stuff, writing, drawing, video creation, programming, etc., professional or personal)

    ~/temp (a non-hidden temp folder with a script that wipes it when the PC shuts down or reboots, used for downloads and such to prevent the "downloads folder is an abomination" problem that plagues any computer after a while of usage)

    ~/AppsGames (appimages, applications compiled from source and not installed to system, personal use scripts, wineprefixes, non-steam games)

    aaaand ~/OtherAminals (for stuff I want to keep but have no idea where else to place)

  • source
  • [–] 5 points 11 months ago

    I usually make src, junk, and applications for appimages and unpackaged binaries

  • source
  • [–] 5 points 11 months ago

    ~/tmp

    ~/temp

    ~/temper

    ~/tempest

    ~/misc

    /mnt/other (symlinked)

  • source
  • [–] 5 points 11 months ago (1 child)

    I just at ~/projects it contains a boat load of stuff including my Neovim and bash stuff.

    Guys, use GNU Stow + git for your configs shit's good.

  • source
  • hideshow 1 child comment
  • [–] 4 points 11 months ago

    ~/bin/ which I add to my $PATH

  • source
  • [–] 3 points 11 months ago* (5 children)

    I do a similar thing for code stuffs, generally always make a ~/Git and ~/Godot so I always have a spot for things.

    I also delete most of the auto-created ones if I'm using a DE that does that, because I have my own organization going on with various external/network drives. Only one I have always kept is ~/Downloads.

  • source
  • hideshow 5 child comments
  • [–] 1 point 11 months ago (4 children)

    Okay what is this <sub> convention everyone is using and why is it sometimes </sub> ?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 11 months ago (3 children)

    I'm not sure exactly what you're asking about. Do you mean the directory names?

    In unix, ~ expands to the user's home directory path and / just separates each level in the path.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 11 months ago (1 child)

    Very weird. For some reason Boost displays those like the strings I wrote. Looking at this in the web client now, I see ~. Which btw I'm familiar with :) Thanks for the response!

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 11 months ago

    Ohhh, very odd. I've been noticing a lot of inconsistencies between Lemmy and PieFed like this, and now an app is something else entirely. Seems the fediverse is not unified on markdown support!

    Apologies if I came off as condescending, not my intention.

  • source
  • parent
  • [–] 3 points 11 months ago

    For source code or any project - a folder Projects (on my personal setups) or Documents/Projects/PersonalRepo (more customer specific folders under the Projects sub-folder)

    • Anything under ~/Projects that isn’t just a throwaway will be a git repo.
    • Anything under ~/Documents/Project/*Repo will be a git repo.
  • source
  • [–] 3 points 11 months ago*

    ~/Repos (For all the github and other code repositories I work in)

    ~/Scripts (All my random Bash scripts, sometimes for testing out stuff)

    ~/Junk (Mostly used for testing programs or small project components that aren't mature enough to have their own repo)

  • source
  • [–] 3 points 11 months ago

    Under ~ I usually make ~/Application for flatpaks/appimages etc, ~/Script for any kind of script I write in bash, python, or whatever else, ~/Audio for audio/music production stuff, and ~/Games for emulators and such. ~/Documents is reserved for actual documents containing text data usually.

  • source
  • [–] 2 points 11 months ago*

    From back when I used to freelance as a photo and video editor. ~/Media which was a mount point for my second hard drive with all the personal and paid customer's I was working on, it was a mix of Music, Photos and Videos that I was creating, but not consuming if that makes sense.

    Just a remnant from back when I had a small SSD with my OS and a second larger mechanical drive for everything else

  • source
  • [–] 3 points 11 months ago (1 child)
    • ~/Documents/incubator for my personal projects.
    • ~/Documents//<user/org>/ for contributing/working on my saved projects
    • ~/Documents/schule for school
  • source
  • hideshow 1 child comment
  • [–] 3 points 11 months ago

    ~/dev

    ~/dev/oss

    ~/dev/work

    ~/dev/personal

  • source
  • [–] 2 points 11 months ago* (last edited 11 months ago)
    • ~/Prototypes for ... my prototypes, typically either starting from an empty directory or cloning a repository and adapting it for my needs. I have this directory on nearly all my devices, desktop of course but also NAS, server, phone, standalone XR headset, etc.
    • ~/Apps in addition to ~/bin, typically binaries but all AppImages
  • source
  • [–] 2 points 11 months ago

    ~/nixos/ for my NixOS config ~/repos/ for git repos ~/audio/ for my sound library and recordings

  • source
  • [–] 2 points 11 months ago

    ~/Transfer

    for SyncThing

  • source
  • [–] 2 points 11 months ago

    I have ~/work/code/project-name-1, ~/work/code/project-name-2 or ~/priv/code/project-name-3, but not by language... I only separate work and private repositories.

  • source
  • [–] 2 points 11 months ago*

    Conventions I have are:

    • Downloads folder is ephemeral, don't store/keep things in there I might want
    • ~/scripts - personal scripts and one offs
    • ~/Documents/projects/[subdir] - any tech project I may be working on, gets homed here
    • /tmp - always mount it noexec

    I also start off allocating ~ 50GB to / (root) volumegroup. Wine and proton have been taking up nearly the full space though, may need to expand it on my desktop soon.

  • source
  • load more comments
    view more: next ›