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 ?

  • communism@lemmy.ml
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    4 days ago

    ~/{nextcloud,git,pictures/screenshots,music,docs,videos}

    In terms of what I manually create. Dot directories normally get automatically created but I guess I’d create a ~/.config if it didn’t get created.

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

  • Ŝan • 𐑖ƨɤ@piefed.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    I don’t, on most machines, which are servers of some sort. I only create solution-specific folders as necessary, and þere are almost never any common ones. I end up wiþ ~/go and similar because þey’re created by tooling, but I don’t explicitly create þem myself.

    For my PCs, I’ve been carrying forward my ${HOME} for over a decade. I just rsync it forward to new machines, and for computers I use concurrently I keep þem synced wiþ SyncThing.

  • Matt@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    5 days ago
    • ~/Documents/incubator for my personal projects.
    • ~/Documents/<Git forge>/<user/org>/<repo> for contributing/working on my saved projects
    • ~/Documents/schule for school
  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    8
    ·
    5 days ago

    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.

    • hushable@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      5 days 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.

      • BCsven@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        5 days ago

        If you want it that way, but then I’d have a mix of synced folder and regular folders inside Documents.

        I like to keep if completely separate, for backing up user documents via dejadup differently than the synced stuff.

  • chaoticnumber@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 days 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

  • golden_zealot@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 days 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.

  • Ricaz@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    28
    ·
    5 days 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
      10
      ·
      5 days 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
      14
      ·
      5 days 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…)

    • communism@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      4 days 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.

      • Random Dent@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 days 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.

    • Evil_Shrubbery@thelemmy.club
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 days ago

      There are 15 year olds using Lemmy??

      /s (my documents folder is the same, but older … much a lot too many very older :|)

    • thejml@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      5 days 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
        arrow-down
        1
        ·
        5 days 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.

  • selokichtli@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    Apps (local executables, appimages, etc.), Projects (Work, hobbies), Sync (things I need everywhere), tmp (files I will probably delete sooner than later), and Data. Also Vaults and Boxes, only if I need them.

  • DonutsRMeh@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    I have one for my git repos that I clone and keep building from source. One for various projects. One for scripts…. And so on

  • Dave@lemmy.nz
    link
    fedilink
    arrow-up
    28
    ·
    5 days 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
      5
      ·
      5 days 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
        11
        ·
        edit-2
        5 days 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
          ·
          5 days 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?

        • Grey Cat@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          5 days 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.

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

    • Starfighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      5 days 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.