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 ?

  • mko@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 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.
  • InFerNo@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    7 hours 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.

  • treep@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    7 hours ago

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

    • VoxAliorum@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      6 hours ago

      Always backup your tools folder… In the past I only created backups for my “real” code folder and I was quite upset when I lost my small scripts in the last drive death.

  • Björn@swg-empire.de
    link
    fedilink
    arrow-up
    1
    ·
    5 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.

  • Ricaz@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    10
    ·
    9 hours ago

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

    • Random Dent@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 minutes ago

      Mine used to be like that, but now my home folder is rehabilitated by turning ~/Documents into a hellhole of accumulated junk instead.

    • TriangleSpecialist@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      7 hours ago

      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…)

        • TriangleSpecialist@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          7 hours ago

          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.

      • Random Dent@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 minutes 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.

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    6 hours 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
  • Infrapink@thebrainbin.org
    link
    fedilink
    arrow-up
    6
    ·
    8 hours 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.

  • MyNameIsRichard@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    8 hours ago

    ~/Projects - for my coding projects

    ~/Qt - which holds the Qt framework

    ~/Torrents - For torrents that I share

  • Strit@lemmy.linuxuserspace.show
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    7 hours 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.

  • IsoKiero@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    6
    ·
    10 hours 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
      link
      fedilink
      arrow-up
      2
      ·
      9 hours 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.

  • Dave@lemmy.nz
    link
    fedilink
    arrow-up
    17
    ·
    14 hours ago

    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?

    • Starfighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      4 hours 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.

    • underscores@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 hours ago

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

      • Dave@lemmy.nz
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        13 hours ago

        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.

        • underscores@lemmy.zipOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours ago

          for me the project exists because I thought “id like to play with <language> today” but not necessarily “I want to make a <platform> project”

        • Grey Cat@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          7 hours ago

          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.

        • vandsjov@feddit.dk
          link
          fedilink
          arrow-up
          3
          ·
          8 hours ago

          I agree, just have it by project. Otherwise I might have to look in different folders to find something. And what does it add, that something is grouped by language?