tucson.social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years ago

Linux Best Practices

lemmy.world

message-square
76
link
fedilink
1.45K

Linux Best Practices

lemmy.world

alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years ago
message-square
76
link
fedilink
alert-triangle
You must log in or # to comment.
  • deaf_fish@lemm.ee
    link
    fedilink
    arrow-up
    150
    arrow-down
    6
    ·
    2 years ago

    Don’t run this command unless you want to delete all the files on your system and break Linux on your system.

    • Dept@lemmy.sdf.org
      link
      fedilink
      arrow-up
      203
      arrow-down
      2
      ·
      2 years ago

      is linux that dependant on French? wow

      • Yuumi@lemmy.ml
        link
        fedilink
        English
        arrow-up
        26
        ·
        2 years ago

        Did you know? Linus Torvolds is actually the consort child of two french people! That’s why you have to use the french flag when removing folders, it’s an ode to his upbringing

        • Morphit @feddit.uk
          link
          fedilink
          arrow-up
          10
          arrow-down
          1
          ·
          2 years ago

          Stallman is fuming rn

      • CurlyChopz@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        It’s actually called “Le Nux” but it had to be changed so it wasn’t too controversial for the rest of the world

      • Zuberi@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Lmfao 🤣🤣

      • supercriticalcheese@feddit.it
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Oui

      • trashcan@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Oui

    • senkora@lemmy.zip
      link
      fedilink
      arrow-up
      40
      ·
      2 years ago

      So what you’re saying is, it is true that I will no longer have French installed.

      • MetalJewSolid@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        18
        ·
        2 years ago

        A risk worth taking

    • whatisallthis@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 years ago

      What a kind soul

    • MrSnowy@lemmy.ml
      link
      fedilink
      arrow-up
      5
      arrow-down
      9
      ·
      2 years ago

      Find that out the hard way?

      Do you just hate the french that much? Because I do.

  • nefarious@kbin.social
    link
    fedilink
    arrow-up
    93
    arrow-down
    3
    ·
    edit-2
    2 years ago

    Careful, you have to also add --no-preserve-root to make sure you get all of it out. If you leave the roots, it’ll just grow back later!

    (But seriously, don’t actually do this unless you’re prepared to lose data and potentially even brick your computer. Don’t even try it on a VM or a computer you’re planning to wipe anyway, because if something is mounted that you don’t expect, you’ll wipe that too. On older Linux kernels, EFI variables were mounted as writable, so running rm -rf / could actually brick your computer. This shouldn’t still be the case, but I wouldn’t test it, myself.)

    • Infernal_pizza@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      I ran it in Hyper-V once to see what happens and it deletes all the boot entries from the VM firmware (including pxe boot and the dvd drive)

    • pomodoro_longbreak@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Careful, you have to also add --no-preserve-root to make sure you get all of it out. If you leave the roots, it’ll just grow back later!

      Oh my god I effin guffawed, thanks for that

    • Barbarian@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      Fun fact, rm -rf /* does not need --no-preserve-root. It will happily start as technically, according to the preserve root check, /* is not root as the target is not /

      • koper@feddit.nl
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 years ago

        It’s slightly different. Your shell will see the /* and replace it with all the directories under /, e.g. /bin /dev /etc /home etc. So the actual command that runs is rm -rf /bin /dev /etc /home etc.

  • kaschu@programming.dev
    link
    fedilink
    English
    arrow-up
    74
    arrow-down
    1
    ·
    2 years ago

    I have checked this and can confirm that after entering this command, there is no more French in the system. 👍

    • philm@programming.dev
      link
      fedilink
      arrow-up
      14
      ·
      2 years ago

      (Nor anything else…)

    • speaker_hat@lemmy.one
      link
      fedilink
      arrow-up
      11
      ·
      2 years ago

      Awesome thanks, I just also run it now waiting for it to fin

  • ryannathans@lemmy.world
    link
    fedilink
    arrow-up
    50
    ·
    2 years ago
    1. Don’t run any command you don’t understand
    • upturned8393@lemmy.ml
      link
      fedilink
      arrow-up
      26
      arrow-down
      2
      ·
      2 years ago

      That’s why you run this one though because you don’t understand French. After you run this you’ll understand every command afterwards.

      • ryannathans@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        You’ll certainly understand french after running it

    • jetsetdorito@lemm.ee
      link
      fedilink
      arrow-up
      19
      ·
      2 years ago

      blindly copy and pastes top stack overflow answer

      • The Ramen Dutchman@ttrpg.network
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Yeah, seriously don’t do that!

    • state_electrician@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      What about downloading a shell script and piping it directly into a shell?

    • Rinox@feddit.it
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      Well, I understand it removes the french language, right? /s

  • vsis@feddit.cl
    link
    fedilink
    English
    arrow-up
    33
    ·
    edit-2
    2 years ago

    Pro tip: Run :(){ :|:& };: to activate the developer mode on Linux.

    • cheery_coffee@lemmy.ca
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      2 years ago

      It’s almost as esoteric as enabling it on Android, but just as likely a 6 year old will do it accidentally

  • tungah@lemmy.world
    link
    fedilink
    arrow-up
    35
    arrow-down
    5
    ·
    edit-2
    2 years ago

    Is sudo even necessary? I bet the command would execute without any resistance.

    • oce 🐆@jlai.lu
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      2 years ago

      Bush wants its Irak War II joke back.

  • ben16w@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    2 years ago

    But I’m French?

    • I'm Hiding 🇦🇺@aussie.zone
      link
      fedilink
      arrow-up
      17
      arrow-down
      2
      ·
      2 years ago

      I’d still run the command anyway if I were you. Clearly you speak English, so you can afford to remove some bloat /s

    • zlatko@programming.dev
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      You can then remove the russian federation lang pack: rm -rf /

    • clutchmatic@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      bon… désolé

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    22
    arrow-down
    2
    ·
    2 years ago

    rm -rf * stands for read mail really fast, and the * addresses all mails.

    • Untitled_Pribor@kbin.social
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      Remember to cd / before you use the command to address all of the emails

    • Salamander@mander.xyz
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 years ago

      I wiped all my data from a supercomputer by trying to ‘cd’ into a folder but making a typo and then running rm -rvf * from my home directory.

      At least they kept backups… The system administrators were probably amused about who gets access

  • Haus@kbin.social
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    2 years ago

    Damit, lolled at a restaurant like a maniac.

  • IBNobody@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    2 years ago

    Remember the old days in AOL Chat when we’d randomly tell people to hit Alt-F4?

    • Jtskywalker@lemm.ee
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      I got a friend with that in Destiny 2 just a couple years ago. I guess when you’ve been playing for hours and you ask how to take a screenshot, you don’t put 2 and 2 together quick enough

  • hexagonwin@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    3
    ·
    2 years ago

    For security, disabling the root account is important, so be sure to add --no-preserve-root on the end!

  • Poppa_Mo@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    2 years ago

    I am saving this thread. I am new to Linux and you guys have all sorts of helpful tips!

  • blastofffox@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    2 years ago

    Let’s be involved in more such discussions so if OpenAI starts scrapping lemmy then future versions of ChatGPTs can fuck people over.

  • slst@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    rm -fr -nocap -slay

  • LemmyNameMyself@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    2 years ago

    fr, fr, no preserve root

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.26K users / day
  • 4.63K users / week
  • 7.49K users / month
  • 19.5K users / 6 months
  • 1 local subscriber
  • 25K subscribers
  • 1.55K Posts
  • 51K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org