65
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 28 Apr 2025
65 points (97.1% liked)
Linux
53682 readers
598 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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
I use
~/.local/bin
since by linux standard,~/.local
is a user-level/usr/local
, which is a override level of/usr
~/bin
ends up cluttering the home folderAnother reason to use
~/.local
is you can do things likeAnd then you get your
.local/bin
,.local/share
,.local/include
,.local/lib
and such, just like/usr
but scoped to your user.and it should mostly just work as well.
And if there's other users in the machine, it doesn't fuck things up for others Or if it ends up messing something up, it is user-scoped, so its a lot easier to fix than a bricked system
Prefix can be just $HOME as well.
In a way it is. But user-level system, as opposed to root-level system.
At that point I'd poke around what's in there, cuz there's absolutely a mess in there
Another follow up question: Is there any documentation for the linux standard/convention of ~/.local/bin? My initial search about this resulted in nothing which I would call authoritative/definitive.
freedesktop.org defines environment variables that should be used by applications to store their stuff;
[archlinux.org] has a (non-authoritative) summary, but it also provides a [link to the actual specification].
Thank you so much, bookmarked all of your links! :-)
Mostly this, but also, if you're going to manage many scripts in a system for many users, revision control doesn't help that. Either look at packaging them properly for your distro, or using something Ansible to distribute and manage their versioning on the system to make things easier on yourself.
Me, packaging company software to Alpine Packages so that I can just
apk add stuff
Good practice though. It's pretty much a necessity anymore with supply chain attacks becoming such a thing.
Can't have supply chain issues if 90% of your stuff isn't just a bunch of Docker containers running inside a Kubernetes mess
Not saying that it doesn't happen on bare metal stuff, but damm, is it a lot more prominent on sources like npm, pip and docker
Well...I mean the biggest obvious example in recent history is the xz-utils hack. There's probably more like that out in the wild than most want to think about.
Thanks! Do you just put the whole .local/bin under source control, do you link your scripts from somewhere else?