this post was submitted on 02 Aug 2023
2075 points (98.2% liked)

linuxmemes

21282 readers
1349 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     

    Down that hole

    you are viewing a single comment's thread
    view the rest of the comments
    [โ€“] rickywithanm@aussie.zone 25 points 1 year ago (45 children)

    Im about to take the same plunge into Linux. Any tips for a new comer?

    [โ€“] BlueKey@kbin.social 26 points 1 year ago (2 children)

    don't listen to people who tell you to
    rm -rf --no-preserve-root /

    [โ€“] BlueKey@kbin.social 6 points 1 year ago (1 children)

    and one more thing: always look up what commands will do. So you can prevent bad behaviour and learn their options to use them later on your own.

    Options for help:

    • --help
    • man
    • your favourite search engine
    [โ€“] russjr08@outpost.zeuslink.net 1 points 1 year ago (1 children)

    I definitely recommend getting used to --help and man, but after you've become comfortable with those I find that this utility is also fantastic.

    Example of the output of tldr git checkout:

    [โ€“] rickywithanm@aussie.zone 2 points 1 year ago (1 children)

    Pardon the late reply but what does man do?

    [โ€“] russjr08@outpost.zeuslink.net 2 points 1 year ago (1 children)

    No worries! The man command is short for manual - basically, you can think of it as a local wiki on your computer (local being that you don't need internet to access it) for various installed things. While "things" is generally going to be programs for most people, the "man page database" can actually have entries for things that aren't programs like various Linux internals! Here are a couple of other example man pages:

    That last one, bash-builtins I linked to also demonstrate that there are man pages for more than just programs. cd for example is a very commonly used command, but its not actually a program - it is what is known as a "built in" because its a part of the specific shell you're using (9 times out of 10 these days, that is going to be bash unless you install a different one like zsh). A ton of commands can often be found under /usr/bin (or /usr/local/bin) - if you enter which program_name at your shell, it'll tell you where exactly that program lives at. Commands come in many flavors, they can be programs, they can be built-ins, they can be shell scripts (even if there is no file extension, Linux doesn't actually care about the file extension - its purely there for us humans!), or they can be aliases.

    A couple of fun facts on even that itself:

    • You can run which which to see where the which command itself lives
    • The which command will also tell you if there is an alias defined for the command, an alias is a custom defined command - but if you have a longer command that you commonly want to run you can redefine it as an alias, so ls is often by default an alias of ls --color=auto to give you a few splashes of colors in the output of the command without actually having to type out ls --color=auto every time
    • Despite the fact that cd is a built-in, for what I believe is compatibility reasons, there is a file at /usr/bin/cd on most Linux distributions... which itself is just a shell script that actually invokes the cd built-in!

    That's probably a bit more information than you originally intended, but I like to be thorough on these sorts of things as I'm passionate about Linux! Note that at the start, man pages can often seem really daunting, but after spending some time looking at them you'll get really good at quickly finding what you need. You can even write your own, and there is even a man page on the conventions and specifications on how you'd usually write them!

    [โ€“] rickywithanm@aussie.zone 2 points 1 year ago* (last edited 1 year ago)

    You explained a lot, thank you. This is my first experience with Linux and its community. It's very nice how willing everyone is to help explain

    [โ€“] rickywithanm@aussie.zone 1 points 1 year ago (1 children)

    And what exactly does that command do?

    [โ€“] BlueKey@kbin.social 6 points 1 year ago (1 children)

    Deletes all the files in the root-dir recursively (needs sudo).
    Without sudo all user-accessible files will be removed.
    This will also affect all mounted drives (like USB-Drives, ...) and on some motherbords can also corrupt the UEFI.

    [โ€“] Qvest@lemmy.world 1 points 1 year ago (1 children)

    If the UEFI is corrupted is there a way to even boot a Live Environment?

    [โ€“] BlueKey@kbin.social 3 points 1 year ago

    If you run a faulty UEFI-implementation then rm can turn you PC into a decorative pice of PCB.
    See this answer.

    load more comments (42 replies)