this post was submitted on 03 Aug 2023
23 points (89.7% liked)
Linux
48165 readers
841 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 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
which commandname
will tell you if there's a command already by that name on your system without having to run anything.This only finds things in places stored in the
$PATH
environment variable, though.You could query your package manager to see what packages for your distribution might contain the command name, but 1) that will also turn up support files and the like and 2) Not all distros have the same commands, especially once you get beyond the core Unix/Linux command set.
e.g. on a system with
apt
, I can runapt contains commandname
and get a list of everything containing "commandname"Another user suggested prefixing with
my_
, but you might consider using your initials, a short form of your username or some other identifier instead. e.g. Everyone is "me/my" to themselves, but fewer people share your initials.Also, a suffix might actually be a marginally better choice depending on your tab-completion preferences.
There's precedent for some actual "official" commands using a
.suffix
style, especially when multiple packages have their own version of a particular command, or a minor variant. On my computer I have things such asuncompress.real
,vim.tiny
,lzip.plzip
andtelnet.netkit
, for example.Something like
scriptname.arcslime
would fit right in, whether or notscriptname
is a thing in its own right or not.I like the .suffix idea, I may run with that, thanks!