this post was submitted on 04 Jan 2025
119 points (98.4% liked)
Linux
48878 readers
971 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
You could make aliases that are easier to remember for you.
If you e.g. had trouble remembering that
mv
does a rename, you couldalias rename=mv
. Ideally just put whatever you would have googled in "linux command to x" as the alias.That's the power of Linux; you can tweak everything to your preferences and needs.
Wild had no idea—this is so cool. If you do this, does the original command also still function (so like I could rename to something easier for me, but hopefully transition to the real deal at some point/ properly follow help forums or suggested pasted commands)
The originals remain untouched.
It is possible to override existing commands with aliases though. This is useful for setting flags by default. I have
alias ls='ls --color'
for instance such that whenever I runls
, it actually runsls --color
, providing colourful output.Note that aliases are only a concept within your command line shell though. Any other program running
ls
internally won't have the flag added and wouldn't be able to use any of the other aliases either (not that it would know about them).It's very easy to program your own "proper" commands though on Linux. If you had some procedure where you execute multiple commands in some order with some arguments that may depend on the outputs of previous commands, you could write all that as a shell script, give it some custom name, put it in your
$PATH
and run it like any other command.Also very cool—the building in default modifiers to the command. Thanks for the great tips.