this post was submitted on 10 May 2024
90 points (95.9% liked)

Linux

48315 readers
847 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

Related Communities

Community icon by AlpΓ‘r-Etele MΓ©der, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
90
submitted 6 months ago* (last edited 6 months ago) by land@lemmy.ml to c/linux@lemmy.ml
 

Hey folks, I just got Bazzite OS KDE up and running on my PC. Being a Linux newbie, I'd love some tips, tricks, and app suggestions if you have any. πŸ˜… Switching from Windows has been a bit of a maze with all the distros out there, so any pointers would be awesome!

The amount of tutorials out there is overwhelming. Hopefully πŸ™ you guys point me in the right direction.

Edit: That is a lot of great information. I really appreciate you guys taking your time to share your experience/advice.

you are viewing a single comment's thread
view the rest of the comments
[–] Cpt_ManlyPink@programming.dev 16 points 6 months ago* (last edited 6 months ago) (2 children)

I am longtime Linux user ( but I don't consider myself an expert ).

Here are some considerations and knowledge bits I have accumulated:

  • If you're using terminal - especially when you copy commands from internet try to look up command and flags you're about to execute. Be VERY thoughtful when running any command with recursive flag ( usually -r or -R, depends on the command ). There are multiple commands, when misused without understanding, can ruin the system. For example running rm -rf <directory> ( deletes all files and directories that are in <directory> ) 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.
  • If you put 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.
  • In some cases you may be required to use vi or vim 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/vim
  • If anyone suggests to give file 777 permissions, like sudo 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 possible
  • In most Linux distributions, there is pre-installed terminal application Zenity ( can check with zenity --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 )
zenity --info --extra-button=TEXT --extra-button=TEXT2 --extra-button=TEXT3 --width 50 --height 50
  • As other people have mentioned, you can always run man cp ( or cp --help ) where cp ir command you would like to learn more about, see all flags and required arguments ( in this case cp is command for copying files and directories )
  • Some useful commands
    • find - well... finds files/directories ( example find -name ~/Desktop "*.txt" , finds all files with txt extension on desktop )
    • grep - find text in files
    • tail - show last lines of long file ( mainly used for log files )
    • head - show first lines
    • wget - allows you to download files when provided with URL
    • curl - make HTTP requests to sites, retrieve HTTP responses
    • watch - repeat command with time intervals ( example watch -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 cases
  • QDirStat - Very cool application, I use it regularly ( https://github.com/shundhammer/qdirstat ). When provided with directory, after it's done analyzing, it will show chart of what files takes up the space and if you wish can locate/delete them from the application window ( bigger rectangle means bigger file ). Super-useful when trying to understand what takes up the storage.
[–] Andromxda@lemmy.dbzer0.com 10 points 6 months ago* (last edited 6 months ago) (2 children)

This 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 for grep.

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.

[–] pukeko@lemm.ee 6 points 6 months ago (2 children)

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!"

[–] rotopenguin@infosec.pub 5 points 6 months ago

sl is the single best utility, hands down

[–] Andromxda@lemmy.dbzer0.com 0 points 6 months ago

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.

[–] AnUnusualRelic@lemmy.world 1 points 6 months ago* (last edited 6 months ago) (1 children)

There are always exotic alternative commands, but those were the standards.

Always learn the standard commands.

[–] Andromxda@lemmy.dbzer0.com 1 points 6 months ago (1 children)

But find is sloooow. fd is so much faster, because it's written in Rust and optimized for performance.

[–] AnUnusualRelic@lemmy.world 2 points 6 months ago

But you can always count on find being there on any unix system. Fancy exotic commands may have nicer speeds or options, but they'll only be there on your machine. And one day you'll be on another, and you'll be lost.

[–] gomp@lemmy.ml 7 points 6 months ago (1 children)

vi or vim [...] :q to quit

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)

[–] Cpt_ManlyPink@programming.dev 1 points 6 months ago

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