114
submitted 1 day ago* (last edited 1 day ago) by underscores@lemmy.zip to c/linux@lemmy.ml

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 ?

(page 2) 50 comments
sorted by: hot top controversial new old
[-] Infrapink@thebrainbin.org 6 points 1 day 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.

[-] InFerNo@lemmy.ml 4 points 1 day ago

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.

load more comments (1 replies)
[-] pineapple@lemmy.ml 6 points 1 day ago

~/ linux iso's

[-] SolarPunker@slrpnk.net 9 points 1 day ago
[-] Strit@lemmy.linuxuserspace.show 6 points 1 day ago* (last edited 1 day 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.

[-] justlemmyin@lemmy.world 6 points 1 day ago
load more comments (1 replies)
[-] IsoKiero@sopuli.xyz 6 points 1 day ago

~/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.

[-] vandsjov@feddit.dk 2 points 1 day 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.

[-] MyNameIsRichard@lemmy.ml 4 points 1 day ago* (last edited 1 day ago)

~/Projects - for my coding projects

~/Qt - which holds the Qt framework

~/Torrents - For torrents that I share

[-] hexagonwin@lemmy.sdf.org 2 points 23 hours ago

i have a 'src' directory. tho my home directory is extremely messy, ls | wc -l gives me 170 now..

[-] Pika@sh.itjust.works 6 points 1 day ago

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

[-] RedSnt@feddit.dk 2 points 1 day ago

Ahh, a ~/.local/opt folder makes so much sense. I'm currently just using a ~/.opt folder, same purpose.

load more comments (1 replies)
[-] skankhunt42@lemmy.ca 10 points 1 day ago

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.

[-] RiderExMachina@lemmy.ml 5 points 1 day ago

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

[-] underscores@lemmy.zip 4 points 1 day ago
[-] GreyCat@lemmy.world 4 points 1 day ago

It basically allows you to define which paths are used for the Downloads, Documents, Videos, etc.. types of directories.

[-] pemptago@lemmy.ml 7 points 1 day ago

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.

[-] RiderExMachina@lemmy.ml 1 points 1 day 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.

[-] utopiah@lemmy.ml 2 points 1 day ago* (last edited 1 day 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
[-] TropicalDingdong@lemmy.world 8 points 1 day ago

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

[-] monovergent@lemmy.ml 6 points 1 day ago* (last edited 1 day 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.

[-] morto@piefed.social 6 points 1 day 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

[-] bjoern_tantau@swg-empire.de 1 points 22 hours ago

I usually make ~/Packages for various binary packages that I can't add as repos for whatever reason. And ~/Packages/src for stuff I compile myself.

And ~/Games for games.

[-] hushable@lemmy.world 3 points 1 day ago* (last edited 1 day 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

[-] golden_zealot@lemmy.ml 3 points 1 day 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.

[-] mko@discuss.tchncs.de 1 points 23 hours 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.
[-] wwwgem@lemmy.ml 5 points 1 day ago

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/

[-] thejml@sh.itjust.works 6 points 1 day ago* (last edited 1 day ago)

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".

[-] wwwgem@lemmy.ml 2 points 1 day ago

Drawing the line between each category indeed takes some time. Our brain is not use to this approach anymore. Perseverance is key, but it's kind of a commitment.

[-] tyler@programming.dev 2 points 1 day ago

~/dev

~/dev/oss

~/dev/work

~/dev/personal

[-] turbowafflz@lemmy.world 4 points 1 day ago

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

[-] beerclue@lemmy.world 2 points 1 day 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.

[-] phaedrus@piefed.world 3 points 1 day ago* (last edited 1 day ago)

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.

[-] TrickDacy@lemmy.world 1 points 1 day ago

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

load more comments (4 replies)
[-] mesamunefire@piefed.social 1 points 1 day ago* (last edited 1 day ago)

Usually git or development.

[-] obscure0602@lemmy.world 1 points 1 day ago
[-] Penguincoder@beehaw.org 2 points 1 day ago* (last edited 1 day 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.

[-] wuphysics87@lemmy.ml 1 points 1 day ago
[-] lilith267 1 points 1 day ago

Defaults are good for me but I like mounting my secondary drive to ~/Storage with subfolders media, projects, games

[-] kutsyk_alexander@lemmy.world 1 points 1 day ago

I have a test folder where I clone various git repisitories, compile programs from source or test some small scripts.

[-] chaoticnumber@lemmy.dbzer0.com 1 points 1 day ago

A gits dir and a dir called "wd". Short for working dir.

Its a dumpfest of scripts, tomls, yamls, directories galore. The gits dir is where I keep my cmdb, that one is organized. wd is like a playground where I allow myself not to give a shit

load more comments
view more: ‹ prev next ›
this post was submitted on 09 Dec 2025
114 points (100.0% liked)

Linux

60103 readers
666 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS