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 ?

  • mbirth 🇬🇧@lemmy.ml
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    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.

    • astronaut_sloth@mander.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      Yep, I also have a directory for my programming projects on each of my machines, but mine is Programming. On my main desktop, I also have an ISOs folder to hold my OS ISOs for VMs and old CD-ROM game ISOs.

  • Dave@lemmy.nz
    link
    fedilink
    arrow-up
    13
    ·
    2 months 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?

    • underscores@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months 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
        8
        ·
        2 months 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.

        • vandsjov@feddit.dk
          link
          fedilink
          arrow-up
          3
          ·
          2 months 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?

        • underscores@lemmy.zipOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 months 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”

  • morto@piefed.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 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

  • IsoKiero@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months 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
      ·
      2 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.

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

    • thejml@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      2 months 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”.

      • www-gem@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        2 months 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.

  • Infrapink@thebrainbin.org
    link
    fedilink
    arrow-up
    5
    ·
    2 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.

  • TropicalDingdong@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    2 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.