this post was submitted on 10 May 2024
68 points (100.0% liked)
Linux
1257 readers
71 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
I am longtime Linux user ( but I don't consider myself an expert ).
Here are some considerations and knowledge bits I have accumulated:
-r
or-R
, depends on the command ). There are multiple commands, when misused without understanding, can ruin the system. For example runningrm -rf
( deletes all files and directories that are in `` ) and providing incorrect directory, like OS root directory, can ruin everything. There are many stories how Linux beginners brick their OS ( it's almost like rite of passage ). While it's not strictly required to use Linux, I strongly suggest to try to learn the terminal commands, but be mindful of what you execute. Few other commands to respect:mv
- moves files/directories,chmod
- changes directory/file permissions,chown
- changes directory/file owner.sudo
in front of the command, it means it will be executed as an administrator, giving that command additional power. It's required in many cases, but when paired with point above, it can potentially do more damage.vi
orvim
to edit files, learn the commands to write, exit the application (:q
to quit ). There are many memes about Linux beginners trying to exit vi/vim777
permissions, likesudo chmod 777 somefile.sh
( which means, every OS user can do everything with specific file ), usually it's quick and hacky workaround. While not in every case possible, you should always strive to find least permissions needed whenever possiblezenity --version
). It allows you to make simple window applications without programming, and gives ability to pass input information to other commands. Personally I use it to quickly store bookmarks I find. With keyboard hotkey I show zenity window with 2 text inputs ( url, title), and input texts are stored in database. Can read about Zenity here: https://help.gnome.org/users/zenity/stable/. There are color pickers, calendars, tables and so on. For super-simple example, following line will create simple info window with 4 buttons ( 1 default for info window, and 3 extra buttons )man cp
( orcp --help
) wherecp
ir command you would like to learn more about, see all flags and required arguments ( in this casecp
is command for copying files and directories )find
- well... finds files/directories ( examplefind -name ~/Desktop "*.txt"
, finds all files with txt extension on desktop )grep
- find text in filestail
- show last lines of long file ( mainly used for log files )head
- show first lineswget
- allows you to download files when provided with URLcurl
- make HTTP requests to sites, retrieve HTTP responseswatch
- repeat command with time intervals ( examplewatch -n 1 ls -la ~/Desktop
, will list Desktop files repeatedly with 1 second interval.watch
command can be useful when you want to watch for some changes in file lists, file contents and many other casesThis comment is awesome! Just want to add some things.
There are some better alternatives for the commands you listed. For example fd for
find
and ripgrep forgrep
.There's a command line alternative for QDirStat called
ncdu
(https://dev.yorhel.nl/ncdu), as well as a (in my opinion) better graphical application called Filelight.First, I don't disagree with that, but I'm always conflicted. Like, eza is better than ls. Atuin is magic history search. btop/fish/helix etc. etc. etc. But for just getting started I almost want to discourage finding alternative tools. But I also don't lol.
Also, I am 99.9% certain this exchange is how most distros get started. "We can do a more sensible set of defaults!"
sl is the single best utility, hands down
I just think that these new, fancy applications are more user-friendly, because they are often easier to use, are faster and often have things like colored output. Sure, the GNU coreutils are old and reliable, and can be found on almost every system, making them great for scripts, but for normal, interactive CLI usage I prefer the modern alternatives.
you are depriving OP of an experience there... getting stuck in vi is a rite of passage nobody should be denied (but, alas, a lot of distros carry nano nowadays)
Sorry, you're right Only after you "rm -rf" root directory at least once and try to exit vi/vim, you have truly learned Linux