Really Dumb Things I've Done On Linux

Поделиться
HTML-код
  • Опубликовано: 19 мар 2024
  • You've made mistakes on Linux. I've made mistakes on Linux. It happens.
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: ruclips.net/user/redirect?even...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    📁 GitLab: gitlab.com/dwt1
    🗨️ Mastodon: fosstodon.org/@distrotube
    👫 Reddit: / distrotube
    📽️ LBRY/Odysee: odysee.com/@DistroTube:2
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • НаукаНаука

Комментарии • 348

  • @OraOraOra
    @OraOraOra 3 месяца назад +247

    Installing Windows AFTER installing Linux on the same drive. . . 😐

    • @aintnochange
      @aintnochange 3 месяца назад +8

      I feel that bro 💀

    • @kellypainter7625
      @kellypainter7625 3 месяца назад +58

      Installing Windows. There fixed that for ya

    • @rehman_786_0
      @rehman_786_0 3 месяца назад

      lol 😂​@@kellypainter7625

    • @Proferk
      @Proferk 3 месяца назад +3

      What's wrong? That's EXACTLY what the Arch wiki recommends. If you install linux after Windows, then iirc you can't configure some stuff like you can't resize the ESP without moving all the partitions.

    • @kellypainter7625
      @kellypainter7625 3 месяца назад +10

      @@Proferk I know that is how you do it. Just doing it at all is what is wrong.

  • @Andrath
    @Andrath 3 месяца назад +135

    dd is a fun one. I call it the (D)isk (D)estroyer for a reason.

    • @Cyber_Gas
      @Cyber_Gas 3 месяца назад +3

      Yea

    • @soulstenance
      @soulstenance 3 месяца назад +19

      dd is one of the rare cases where I'd say the average user is almost always better off just using a graphical tool. It is really not worth the risk.

    • @ArniesTech
      @ArniesTech 3 месяца назад +2

      I did a tutorial on dd and its actually quite easy to use.

    • @littlepeon
      @littlepeon 3 месяца назад +14

      ​@@ArniesTechdynamite is easy to use, but it, as well can be highly destructive.

    • @TiagoEgas
      @TiagoEgas 3 месяца назад +1

      I thought it was named Data Destroyer... Disk Destroy I think would need some hammer to do de job 😂

  • @evantaur
    @evantaur 3 месяца назад +16

    I've ran destructive (write) bad sector scan on a 12TB drive for like 5 minutes at 3 AM, it was not even the drive that was failing. Good times, never fix a server before going to bed.

    • @javabeanz8549
      @javabeanz8549 3 месяца назад +3

      because bed just got much further away! I've had a couple of those kinds of issues, fortunately not that bad. I did have a bunch of work go away though, when a lightning strike hit next to the office, and scrambled the drive.

  • @LaserFur
    @LaserFur 3 месяца назад +80

    And Linux tech tips "do as I say" and the resulting removal.

    • @anitamaxcode
      @anitamaxcode 3 месяца назад +6

      this was my first thought after i saw the video title lmao

    • @mvandios
      @mvandios 2 месяца назад +1

      definitely the main problem people face with linux. They don't understand that they shouldn't run commands without knowing what they do. Especially with sudo permissions, one should be sure to at least attempt to understand what goes on, even if it's just a skim through the script. That lack of analysis is what leads to probably the majority of non-professional system breakages

    • @no_name4796
      @no_name4796 2 месяца назад +2

      @mvandios tbf, linus problem was a dependency problem in the pop os repository, but yeah you should at least have a vague idea of what each command does, AND ALSO READ THE PROMPT, AND AVOID CONFERMING WHEN THE PROMPT IS LITERALLY "YES BREAK MY SYSTEM" lol

  • @skytale35
    @skytale35 3 месяца назад +53

    My mistake, and it was kind of funny was I was writing an install script for a program I wrote in python. I got distracted while writing the script, and when I went to run it, changed the permissions for every file on my system to "read only". There is no happy way to come back from that lol. Funny you mentioned a form of this same thing on your video.

    • @snake_eater1963
      @snake_eater1963 3 месяца назад +8

      ransomware without ransom

    • @no_name4796
      @no_name4796 2 месяца назад +1

      Did you reinstall your system? I believe you should be able to do that, without ending up in the horrifying grub prompt, until you still have the efi folder intact

    • @amy_grace
      @amy_grace 2 месяца назад +1

      I feel like I accidentally `chmod 000` something important every year or two 😂

  • @Maxume
    @Maxume 3 месяца назад +27

    My lesson in humility came when I wanted to install a newer version of Thunar. It required newer versions of some libraries in the repo, so I force installed the newer libraries with deb packages. What an interesting time I had afterwards.

    • @AM-yk5yd
      @AM-yk5yd 3 месяца назад

      Reminded me when I had RedHat and Mandriva distros on CDs(it was cheaper to buy 4-6 cd distro). Both use rpm
      I tried to install some packages from mandriva to RedHat to have more software, and this is when I learned glibc is not fan of compatibility, libraries got intermixed and everything became unstable and unusable

    • @1pcfred
      @1pcfred 3 месяца назад +1

      You don't have to do that. You use the LD_LIBRARY_PATH variable. Then you put the libraries a binary needs off your system library path. What you do is make a shell script wrapper that exports that variable and then calls the program. So that automates everything for you.

    • @littlepeon
      @littlepeon 2 месяца назад

      Or you just add NixOS that loads the newer libraries completely separate from your main OS. This is the way! Compartmentalization.

    • @1pcfred
      @1pcfred 2 месяца назад

      @@littlepeon what I said in my previous comment already does that and it doesn't need to add anything. That's just how the loader works. There's a path it searches by default but in special cases you can direct it to load libraries from somewhere else. You just need to know how. I don't remember how I found out. But since I did I've been doing it for decades now. Dealing with linkage issues is pretty common. It's basic and simple stuff. But I guess when you don't know then it's complicated. Once people are aware of it I think it gets simple then. Everyone man ld.so for an explanation of how programs run. You should know this. Running a program through strace is pretty eye opening too. So also do that. See how the gears turn. Know thy OS.

  • @huljaxful
    @huljaxful 3 месяца назад +67

    My biggest mistake probably is when i was installing the distro thinking my laptop battery is gonna make it till the end 😂

    • @soulstenance
      @soulstenance 3 месяца назад +10

      It's best practice to plug in any battery operated device when running updates or large installations. Guess you know that now. 👀

    • @peterschmidt9942
      @peterschmidt9942 3 месяца назад +4

      Time for a new battery perhaps?

    • @aristokatclaude3413
      @aristokatclaude3413 2 месяца назад +2

      Gentoo enters the chat

  • @paulfrank8738
    @paulfrank8738 3 месяца назад +8

    I've been a Unix/Linux admin for about 30 years. The best habit I developed was testing any recursive command with 'ls' first. That way I could check the output and make sure the 'rm' or 'chmod' command, etc. was going run on what I expected it to. I still managed to destroy a few systems, but this saved me many times.

  • @tenj00
    @tenj00 3 месяца назад +24

    This video is missing some tips to avoid these problems.
    - Use an alias for rm -rf to go into interactive mode. or better yet use trash-cli instead.(alias rm='rm -i')
    - Use /dev/disk/by-id instead of /dev/sda. It is much harder to make a mistake that way.
    - Backup and backup. And if that does not help, just backup some more.

    • @djyotta
      @djyotta 3 месяца назад +1

      I don't do backups. Had a disk spontaneously fail on me, and I still don't do backups. Why? Because it's always been easier to move on from scratch than restore from backup. What I do instead is replication of important data to multiple locations. Closest I get to a full back up is making a tarball of my home dir, and /etc before I reinstall. But only for future reference or to grab are file l forgot was important. These tarballs sit around for years until I need space and are deleted. Very rarely extract anything from them.

    • @paulfrank8738
      @paulfrank8738 3 месяца назад +4

      @@djyottaI call anything that makes sure you have more than one copy of the important data a backup. Though it may not be technically true, I'd call what you do, "backing up your data."

    • @Pabloparsil
      @Pabloparsil 3 месяца назад +2

      I also thought about doing the alias on rm -rf but it's dangerous. You then go and type it in a different machine, used to it being interactive and... You are in for some fun.

    • @Pabloparsil
      @Pabloparsil 3 месяца назад +1

      Now that I think about it, I suggest that you alias rm -i to "remove" or something similar, so that when you move to another machine the command will not be found and you won't mess up anything. Only downside is that you might forget that removing is done with rm but that looks difficult to forget when you have been typing it for years

    • @tenj00
      @tenj00 3 месяца назад

      @@PabloparsilNo risk no fun

  • @sumanmondal4251
    @sumanmondal4251 3 месяца назад +10

    Couldn't agree more. Each time I broke a stable system, I learned something new.

    • @sfwnofficial
      @sfwnofficial 3 месяца назад

      Fr bro.

    • @javabeanz8549
      @javabeanz8549 3 месяца назад

      I lucked out, and was able to rerun the install as an upgrade, and got all my data back, just had to reinstall the applications and update.

  • @the1trancedemon
    @the1trancedemon 3 месяца назад +21

    Setting all system files to read only is like pouring super glue onto your cycle.

  • @ForeverZer0
    @ForeverZer0 3 месяца назад +11

    I did the rm -rf on home once before. I use zoxide, and didn't notice that it had "corrected" my previous cd command. I did it with verbose flag, and I found myself suddenly watching the terminal text flying by, telling me in-detail specifically how it was destroying my soul. I hit it with a interrupt before it finished, but the damage was done. I just ended up reinstalling my whole system, was easier than trying to figure out the mess I made. Luckily most anything critically important is always backed up on other drives and/or git.

  • @usopenplayer
    @usopenplayer 3 месяца назад +13

    I've gotten in trouble with symlinks before.
    For example, I wanted to create a single directory that contained only symlinks to my "important folders" that I wanted to backup. Nice and organized, one stop shop for everything important... I thought.
    I put this "one stop shop" in my home folder. Which also needed to be backed up.
    I used rsync -aL to follow all the symlinks and backup the data.
    This, of course, created an inifinite recursive loop of backups...
    /home/usopenplayer/drives/
    /home/usopenplayer/drives/home/usopenplayer/drives/
    /home/usopenplayer/drives/home/usopenplayer/drives/home/usopenplayer/drives/
    I got very confused when my 8TB drive filled up with what I thought was 1.5 TB of data.

    • @nolan412
      @nolan412 3 месяца назад +6

      The single file system flag, -x, helps here.

    • @usopenplayer
      @usopenplayer 3 месяца назад +1

      @@nolan412 Thank you!!

  • @LuealEythernddare
    @LuealEythernddare 3 месяца назад +6

    For the formatting drive one, I actually even did that on windows, much less Linux. Long story short, disk part wasn’t working, instead of double checking why, I downloaded a data nuker, and ran it, long story short I was selecting the wrong drive, my C drive. That’s the story of how I started daily driving Linux for awhile.

  • @AQDuck
    @AQDuck 3 месяца назад +50

    First f-up I did was wipe a 16 year old harddrive filled to the brim with nostalgia (was intending to move them to a brand new ext4 drive for safe keeping).
    NEVER trust /dev/sdX names after a reboot.

    • @soulstenance
      @soulstenance 3 месяца назад +10

      Ouch! I didn't know those were unreliable, but still, running a simple lsblk would have likely averted that disaster. ☹

    • @nolan412
      @nolan412 3 месяца назад +3

      Use /dev/disk/by-*

    • @variancewithin
      @variancewithin 3 месяца назад +4

      lsblk -l and fstab are advanced but yeah i never ever ever ever trust /dev/ to be what i want it to be.

    • @djyotta
      @djyotta 3 месяца назад +3

      I feel your pain. Iol I always # or echo my dangerous commands first, then go back and recheck my info with Is or whatever, against my built command, then run it if still looks right. Works in scripts to: l use echo and set -x in dangerous parts of bash script and see what it does after vars are expanded before I run it for real. Super paranoid for a reason

    • @gassug2
      @gassug2 3 месяца назад

      this is why i always double check the contents of a device/partition when doing possibly destructive stuff with them in chroot (e.g, changing filesystems, moving data to another storage device)

  • @superangrybrit
    @superangrybrit 3 месяца назад +21

    I unplug my other HDDs when doing (re)installs. Cheers! 👍

    • @leighsaunderson9203
      @leighsaunderson9203 3 месяца назад +7

      Yup!
      I've had multi drive systems for 20+ years, usually one live Windows install (mainly for games these days, in fact 99% for games only !), plus a live/main Linux distro, and one or two 'trying these distros'.. drives..(or old distros when I've changed...)
      despite knowing the disk makes and types, I still find it more relaxing to just unplug the others first, it only take a few seconds!

    • @AM-yk5yd
      @AM-yk5yd 3 месяца назад +3

      I did it at some point which resulted in unbootable system because hda, hdb, hdc all get messed up.
      These days it's harder to mess up this way as /etc/fstab uses guids instead of /dev/sda

  • @friedrichdergroe9664
    @friedrichdergroe9664 3 месяца назад +6

    I did a "chmod -R .." once. DON"T DO THAT.
    Worse< I misconfigured logrotate on a production system and deleted the live MySQL files. I was able to reattach the inodes to filenames again, and that was unbelievably tricky.

  • @shreyasas3128
    @shreyasas3128 3 месяца назад +20

    Installing trash-cli and aliasing it to rm was one of the game changers for me. Highly recommended.

    • @moussaadem7933
      @moussaadem7933 3 месяца назад +3

      Or the built in `gio trash` if you use gnome

    • @shreyasas3128
      @shreyasas3128 3 месяца назад +2

      @@moussaadem7933Agree. But using DE-agnostic program like trash-cli means we don't need to change alias when switching to different DE/WM.

    • @moussaadem7933
      @moussaadem7933 3 месяца назад

      @@shreyasas3128 yep, and using the same tool your DE uses means less dependencies and more consistent behaviours, I want recommending anything tho, just throwing an information out there

  • @tiitulitii
    @tiitulitii 3 месяца назад +13

    Destroying your optical backup disk on a disruptive hardware. Then, your system administrator repeating the same for your second optical backup disk. Then, taking your original hard disk with you to a new working place. And, finally, an unknown computer nerd there loaning your hard disk from your unlocked drawer without a permission during the weekend and accidentally removing all its contents. ... 20 years of your research etc. work destroyd permanently! This is a true story.

  • @AkamiChannel
    @AkamiChannel 3 месяца назад +4

    With these dangerous commands like rm and dd, I always write out everything after the command itself first. Then I double and triple check that I have that part correct, then I actually type rm or dd and run the command.

  • @paulsander5433
    @paulsander5433 3 месяца назад +4

    My lessons: 1) Never use the -y option with a package manager on the command line on the first run. (Review what it would do, then either answer YES or re-run from command line history and add -y.) 2) In a script, set the -u option, which abends the script if it tries to expand an uninitialized variable. Many erroneous rm's (and other bugs) can be prevented due to typos in variable names. 3) Never add a random repo to your package manager that you find via a web search or cheatgpt or stackoverflow.
    And why doesn't apt have a command line option to enable or disable a configured repo, like yum does? Why should an end user, even one with root access, have to temporarily uncomment an entry in a repo list to install a package from a repo that's used only for unusual situations?

  • @airilsra
    @airilsra 3 месяца назад +3

    That's the right message at the end, create backups.
    I'm careful enough to always double check before running rm or dd. But I've been burned a couple of times by badly designed softwares that ended removing some of my data. Just yesterday I read that a theme from KDE store nuking user home directory. You won't know when or for which these would happen to you.

  • @DV-ml4fm
    @DV-ml4fm 3 месяца назад +9

    Also before deleting files check which directory you're in first.

    • @javabeanz8549
      @javabeanz8549 3 месяца назад +1

      I learned that one the hard way. I was working on the ISP firewall, and went to delete the old rules and instead deleted the active rules. I had to drive to town, call the NOC to explain why I needed to get in during the middle of the night. Fortunately I had a backup.

    • @DV-ml4fm
      @DV-ml4fm 3 месяца назад +1

      @javabeanz8549 Yeah, I was also a victim of my carelessness too. I was deleting old files and forgot to check my current directory. When I realized what I did, I used testdisk right away to recover the files. Boy, I'm glad I knew about testdisk.

    • @DV-ml4fm
      @DV-ml4fm 3 месяца назад +1

      @javabeanz8549 I know the feeling when you accidentally delete files, especially the crucial ones. That why, backups are so important to do. Happy to know that you got your files back.

  • @Seofthwa
    @Seofthwa 2 месяца назад +2

    Sometimes breaking things are the best lessons. If you figure it out, you will never forget it.

  • @thgreenshaman8503
    @thgreenshaman8503 3 месяца назад +12

    DT needs some tropical fish in the background.

  • @lgajai
    @lgajai 2 месяца назад +1

    One of my colleagues did this infamous movement by "rm -rf /*" with root user. Not on Linux but on AIX server in enterprise environment. He was the teacher for new server admin guys on that day and shown them what should not do in any cases. So wrote this command in root session and hit the enter automatically instead of ctrl+c. When he realized this mistake he had the chance to show how to restore the filesystem of an AIX from backup when necessary.

  • @user-rq3hz8yh4t
    @user-rq3hz8yh4t 3 месяца назад +3

    I so appreciate your platform. I could sit in your classes all day!

  • @torspedia
    @torspedia 3 месяца назад +4

    I've certainly deleted my entire system, back in my early days of using Linux. Downloaded a new DE to try, but wanted to delete it after realising I didn't like it. During the deletion process I quickly realised it was deleting things I wasn't expecting. Fortunately, however, I was staying with my dad at the time and he helped me save my data! 🙂

  • @GeekIWG
    @GeekIWG 3 месяца назад +3

    I once did a recursive chown on an OS directory by accident. Thankfully I had used the verbose flag, which shows the old user and group in the output. Was then a matter of copying the terminal output to a file and then writing a script to use that output to set each file back to it's original user and group. Amazingly the system didn't crash. 😅

  • @enderger5308
    @enderger5308 3 месяца назад +2

    For me, it was letting my laptop repeatedly get stuck on a TTY while it was supposed to be in sleep mode inside of a well insulated laptop carrying bag. Needless to say, it got VERY toasty.

  • @donpeer4477
    @donpeer4477 3 месяца назад +3

    WMG, DT! You are the man. Gotta be very humble to admit in public screwing up! Kudos :)

  • @hansdampf2284
    @hansdampf2284 3 месяца назад +3

    Booting into a btrfs snapshot without noticing for several weeks. The snapshot was writable so I didn’t notice.
    Until timeshift cleaned it up so it was basically deleting the system while I was running it. Was easy to rectify since I still had tons and tons of snapshot. But I first had to figure out what the hell is happening

  • @kachmar1
    @kachmar1 3 месяца назад +1

    1. recursive rm
    2. recursive chmod
    3. unsafe bash scripts
    4. format wrond drive
    5. remove wrong packages
    6. partial upgrade
    7. install package bypass package manager (building from source)
    8. add new repositories

  • @mariolis
    @mariolis 2 месяца назад +5

    6:00
    Or you can do the smart thing and always remove every other drive when installing a new OS

  • @deeiodee
    @deeiodee 3 месяца назад +2

    I love the new look!

  • @occultsupport
    @occultsupport 3 месяца назад +73

    the dumbest thing I ever did was try and exit vim. You never exit vim.
    Never.

    • @user-mf6cu5xj3v
      @user-mf6cu5xj3v 3 месяца назад

      :q there you go

    • @Winnetou17
      @Winnetou17 3 месяца назад

      Press and keep Shift and double tab Z there you go

    • @enriqueleon4806
      @enriqueleon4806 3 месяца назад +2

      I turned off my computer jaja

    • @da_roachdogjr
      @da_roachdogjr 3 месяца назад +1

      @@enriqueleon4806 😂😂😂

    • @soulstenance
      @soulstenance 3 месяца назад

      @@user-mf6cu5xj3v I've never understood what that actually means. Do you press colon and then q, do you hold down colon while pressing q, or does ":" stand for some control key? It's anyone's guess. I like nano, much more intuitive - Ctrl+X, then follow the prompts if you need to save and you're done. Only way I've ever successfully closed vim is by literally closing the terminal window haha.

  • @shutdowncnn6086
    @shutdowncnn6086 3 месяца назад +1

    DT mistakes funny you mentioned chown and chmod using the recursive flag commands. Two weeks ago I was playing around with an old drive that I use to created a XFS file system for file storage. Turn out that XFS drive was bad. I was tired after spending three days doing backups between three computers and I used those commands you referenced to reset file permissions on a directory which mess a directory on the /root. I was lucky and able to boot using the backup kernel off grub to correct my errors and it work. All was well except for the HP printer did NOT work gave some strange commands on the filter. After three hours of research, below are some come commands I used today to set everything straight on this box to once again print !

  • @jacobwerner8533
    @jacobwerner8533 3 месяца назад +2

    one of my more recent stupid mistakes was at work i put mx on this computer a year ago and i wasnt the only one who used it so it had repos from bookworm and buster. i assumed it used bookworm as the main repos so i deleted all the buster repos and gpg keys for buster. it was an old version of mx that still used debian 11 repos.

  • @aiyegba3049
    @aiyegba3049 3 месяца назад +1

    I made a backup-script with rsync, using variables in it not mentioning my windowmanager might not have these variables if I create a button for it. In bash, an empty variable is an empty string. Using this button (shutdown including backup) wanted in my case to delete all files beginning from root owned by user including the backup itself. This was a really nightmare!
    Another case is thinking about lightning flashes which might destroy everything connected in anyway. I think it's very important to have backups not connected by wire in any form.

  • @Hyperboid
    @Hyperboid 3 месяца назад +1

    Reformatting my boot partition.
    Look, I can explain. I thought it was from an old install.
    This was back when I used Arch (I'm a fedora fanboy now) and luckily I had a friend willing to let me borrow their laptop to flash the archiso onto a drive, and managed to reinstall the kernel and grub. Good thing I followed the manual install instructions, or I might not have known how to do that.

  • @igorb4650
    @igorb4650 2 месяца назад

    Just FYI: updating to testing works quite well as of past 2 years on debian, the only thing that can break is sometimes drivers but now you can sometimes make more things in your hardware just work(tm) by using testing distro

  • @NimhLabs
    @NimhLabs 3 месяца назад

    For building stuff from source, it is possible to build it as a package, so it is registered by your package manager

  • @zeckma
    @zeckma 3 месяца назад +1

    With the coreutils which I think rm is included in the package, I compiled it vanilla without the --no-preserve-root patch. Yes, I use LFS. Yes, in an effort to delete everything in another partition except the boot directory, I instead wiped my entire LFS system which I poured 40 hours into along with a year of user data. I was very sad that day, it's an unparalleled feeling for all the wrong reasons.

  • @KipIngram
    @KipIngram Месяц назад

    I've never done sudo rm -rf, but I did do a sudo rm * once. Or rather, that's what I set out to do. What I actually did was sudo rm * (note that space between * and ). That cooperatively wiped out a Python file I'd been working on for work for about two weeks. I wanted to go throw up.
    Fortunately, I had just been editing the file and I remembered enough about what I'd just done to do a raw disk sector search with grep, and I had it return the entire sector.. That contained enough of my file to allow me to recover in a few minutes. So in the end it was all ok, but wow - trust me, it's NOT a good feeling. And it's impossible to lay the blame on anyone else.

  • @KrisRogos
    @KrisRogos 3 месяца назад +1

    I deleted /lib and recovered. Still running the same install 2 years later

  • @rufine4114
    @rufine4114 3 месяца назад

    11:38 the main reason is that the packages' names differ, Ubuntu has its own way to name the packages. For example, the chromium package is called `chromium` on Debian, while on Ubuntu it's `chromium-browser`

  • @GamingWithUncleJon
    @GamingWithUncleJon 3 месяца назад

    Regarding recursive chmod, you can sometimes recover system files with getfacl on another system with the same OS and setfacl. Depending on how difficult backing up your data is this can save your bacon, or at least get you functional enough to do data recovery before reinstall

  • @PolarCheese
    @PolarCheese 3 месяца назад +1

    I was backing up my entire system onto an external SSD but I forgot to exclude the media directory, so the system began copying the entire SSD in a folder on the SSD. Right after that, I wanted to remove that entire directory that had the copy of all my backups with the rm rf command but somehow I nearly deleted everything on the SSD. Thankfully I noticed the mistake in time and stopped the command. It only removed some useless files in one of the backup folders, so I was able to recover them from the accidental dublicate that I made earlier before that.

  • @OcteractSG
    @OcteractSG 3 месяца назад

    I did a recursive rm on my boot directory once. I knew I had the boot directory backed up in a BTRFS subvolume (not a separate boot partition at the time, which was a confusingly bad idea), but I did not consider that rm would reach down into the EFI directory, crossing partition boundaries, and wipe the EFI partition. I had to learn how to chroot into the system and do a grub-install.
    Recursive chmod might not be fatal if you can reboot (maybe by forcibly powering off if necessary) and then boot into a backup BTRFS subvolume from GRUB. I have not tested it, but that should probably work.
    Regarding Debian and Ubuntu, Ubuntu is downstream of Debian Sid (i.e., Unstable), much like how Debian Stable is downstream of Debian Sid. Essentially, Ubuntu and Debian are each different ways and cadences of freezing Debian Sid. There is obviously more to it than that, but understanding this relationship between them reveals how adding repos from one to the other is a risky idea. (I should mention that a lot of Canonical developers contribute to Debian, so even though it appears that Debian has total control over Sid and that Debian is a complete single-project-controlled pipeline, Ubuntu has a lot of influence in it as well.)

  • @wilson713
    @wilson713 3 месяца назад +2

    If you work on servers, snapshot them before you do anything remotely risky (if you can). Has saved my ass before.

  • @txm.091
    @txm.091 3 месяца назад +3

    thanks for the video derek. i hope the day trading channel is off to a good start, was just about to check that out

  • @Winnetou17
    @Winnetou17 3 месяца назад

    #HeyDT! I have a question: I see that there's a lot of recommendations about what would be a beginner's Linux distro. But there's nothing more comprehensive for more intermediate to advanced users. I mean, after you go over that "first distro", after you learn and pass the basics and get confortable with Linux, including a bit of CLI, what should a person, assuming the learning curve is no more of a concern, what should a person look to for the "advanced" distro to "settle" in ? When ease of use is no longer a need, what would be a list of distro that someone should check further, possibly finding the BEST distro for them, and why those distro ? I feel like a more comprehensive guide on that is missing. I use Gentoo -btw- fyi!

  • @hansdampf2284
    @hansdampf2284 3 месяца назад

    I don’t even remember what I tried to do, probably trying something with cross compiling but I once changed to environment variable where the glibc runtime finds shared libs. I think it’s LD_LIBRARY_PATH. It’s changed though some file
    In /etc.
    So every program that linked into a shared object didn’t work anymore. (And that’s basically every program, since they almost all link with glibc)
    I still had a shell open, but it wasn’t a root shell, and sudo didn’t work anymore, so I couldn’t change that file in /etc. I ended up changing it from a live disk.

  • @Henry-sv3wv
    @Henry-sv3wv 3 месяца назад

    i sometimes reboot the wrong machine when i don't notice that this terminal is sshed to somewhere

  • @fredmckinney8933
    @fredmckinney8933 3 месяца назад

    Uploading the latest F3OS right now. I've learned to pretty much not even fool with chmod, chgrp, and chown. As for doing so as root, I've set root's bashrc to display a red and yellow prompt to remind users that they're running as root, which can be dangerous, while regular users have Debian's standard green and blue prompt.

  • @dannyboy42223
    @dannyboy42223 3 месяца назад

    Great tips. I use debhelper and dhmake or check install as a last resort to test new things on debian

  • @mitchell6you
    @mitchell6you 3 месяца назад

    Installing latest kernel version manual...lossing gpu hw-acceleration // setting the wrong permissions on files // making to many primary partitions // upgrading win..losing grub // changing location of steam to other hd // .. are just a few that come to mind..

  • @richirich1757
    @richirich1757 3 месяца назад +1

    I forgot the usermod -a -G "-a" option when i wanted to add a group to my user and lost the sudo group :-) on ubuntu it was an easy fix so, rescue boot and mounting root filesystem and adding the group manually.

  • @teenspirit1
    @teenspirit1 3 месяца назад

    2012
    sudo pacman -Syu
    installed an icompatible libc and bricked my archlinux.
    apparently they made a change which required package signing keys to be installed on the system before updating and I missed the announcement.

  • @StopTheNewWorldOrder322
    @StopTheNewWorldOrder322 3 месяца назад

    I ran dd on the wrong drive recently, testdisk was awesome and recovered the drive flawlessly within minutes.

  • @UnruheRevan
    @UnruheRevan 3 месяца назад

    Recently replaced my fstab with a customized one that had some mounted smb shares. Everything worked until I rebooted and realized this had UUIDs from another machine's drives for / and of course this machine would not boot anymore

  • @c99kfm
    @c99kfm 2 месяца назад

    When I swapped from Windows to Debian Slink, my "Linux friend" who helped me out explained /dev/null, in a different context, as basically the Trash bin in Windows. So...I may have moved files there, to remove them. As root. Which meant I replaced the null device with a file owned by root. Which caused all SORTS of havoc with daemons trying to write there.

  • @lePirateMan
    @lePirateMan 3 месяца назад +1

    I once reformated my home partition on a live system

  • @blank-mq8ef
    @blank-mq8ef 3 месяца назад +1

    idk dt this kinda makes me want to install an ubuntu vm and try to replace all the mirrors with the debian ones

  • @ItsCryptic
    @ItsCryptic 3 месяца назад +1

    My biggest mistake was reinstalling docker when I already had it then messing up a system service that was running... oops. I've also ofc done the classic chmod everything too

  • @mcpr5971
    @mcpr5971 4 дня назад

    back in about 2007-8, Gentoo (yes, I _ran_ Gentoo) changed their behavior to begin wiping /tmp on every boot. I blindly "emerge"''d world, and didn't notice, and had been using /tmp as "My Documents" for several months..no backup...lost a ton of data after that "change". _sigh_

  • @MaartenT
    @MaartenT 3 месяца назад

    Yes, putting rm -rf foldername/ * (still not sure why) was probably the dumbest thing I did in a directory full of databases when I was only working for a year or so. I noticed that it took too long when it had removed all databases from a to c before I cancelled it. We obviously had backups, but it wasn't fun asking someone else to put those back after I did something so dumb. I generally only put rm -rf * when I am IN the directory that needs to be cleared nowdays, I will do an rmdir after that the extra command is not worth the risk.
    Also, I had to fix a removed desktop environment at work for someone else. They had no clue how to fix it and claimed they didn't do anything, but either the desktop environment or x was completely gone if I remember correctly.
    I also killed my pacman in a VM once by updating with pacman -Sy (I think) and I don't think I knew how to recover it back then and just either reinstalled or put a backup of the VM back.

  • @rashkae1
    @rashkae1 Месяц назад

    when it comes to rm -rf, I have trained myself to *never* type the -rf until the end of the command (after the path.) That way, you will not accidentally delete the wrong directory with a stray finger hitting Enter Key.

  • @docopoper
    @docopoper 3 месяца назад

    I do have one ubuntu package installed on my debian machine. And that's the manufacturer's software controller for my laptop's fans. Thankfully it works fine. I downloaded the deb directly and installed it because there is no way I am connecting my Debian machine to the Ubuntu repos.

  • @Subh8081
    @Subh8081 3 месяца назад

    1) Installed the bootloader in the wrong place, so after installation the machine booted into Windows.
    2) Deleted a Windows partition while doing advanced disk partitioning
    3) Overwritten stuff cp -rf
    4) Overwrote a system file with stuff while editing in vi and broke stuffs
    5) Deleted important stuff by using rm -rf.

  • @amosnimos
    @amosnimos 29 дней назад

    Did the same this week, wiped out my home with rm rf...
    Following that I nerfed rm and improved my backup methods and will work on permissions and ownership protections...

  • @danieleg8758
    @danieleg8758 3 месяца назад

    My first week on linux (elementary at the time) I CHROOT my entire home folder. I wasn't allowed to get into any folder in the system. Took me ages to fix it. After 3 years i am still reluctant change permission on any file or folder

  • @j_t_eklund
    @j_t_eklund 3 месяца назад

    The only OS that does proper handling of source packages is NixOS.
    All the other systems / package managers have a high/heavy resource requirement on the user to handle it.
    That makes them unmanageble quite qickly,
    as a user can usally handle a few but need a lot of them..

  • @RaviRJoshi
    @RaviRJoshi 3 месяца назад

    Back in Napster days, I lost entire music collection to fdisk.
    Of late, I've lost drive sda to dd. Just yesterday.

  • @mvandios
    @mvandios 2 месяца назад

    I once mistakenly thought I backed up my important files and proceeded to run some reckless commands.... My surprise when that btrfs snapshot was not there :(

  • @ikarm
    @ikarm 3 месяца назад

    I once deleted the Arch Linux local pacman database. It really messed up my system, but after a lot of trial and error, I was able to recreate it.

  • @FranklySecure
    @FranklySecure 3 месяца назад

    You must have the best microphone of any content creator 👌👌👌

  • @gassug2
    @gassug2 3 месяца назад

    dumbest thing i did was go nearly 3 years on my arch install without backups or even snapshots. i recently was able to spare some money for an external HDD and copied my btrfs subvolumes over to there and compressed them. same install is still kicking today but i feel like this outcome is probably the least likely and i got lucky multiple times along the way

  • @tgheretford
    @tgheretford 3 месяца назад +1

    I installed Arch, KDE and the graphics drivers, why am I unable to get to a GUI and keep being dropped to a TTY? Hours later, 'did I install the display manager?' And then it clicked!

  • @1400Lines
    @1400Lines 3 месяца назад +1

    Damn that rm command really fucks me up when i was starting on linux. I remember around 2011 i was asking on ubuntu forum how to install wifi driver since mine was not detected automatically. And some dude posted a sudo rm with an * and got a hundred + vote instantly. And me as a newbie run it and i never look back at linux for almost 5 years.

  • @eduardosorensen8899
    @eduardosorensen8899 2 месяца назад

    Of course `rm -rf /` was the classic one, specially when using root user as the main one!! About 30 years ago, using BitchX (IRC client) with root user, I ran /decode XXXXX, instead of /echo decode XXXXX, and the XXX in action was `rm -rf /`
    When I saw the HD light blinking, I imediately shut it off. A minor "kernel panic" but /home was safe! 😀

  • @ChadsHobies
    @ChadsHobies 3 месяца назад

    I have made my computer non-bootable a couple of times. I upgraded my kernel on Gentoo linux. I was tired and forgot to run the complete set of comands to update, reinstall, and configure Grub. I only updated it. Restarted and went to bed. Woke up to a grub prompt displaying errors. Wasnt a hard fix. But makes you sick to your stomach after you dedicate 14 hours into your system with compiles.

  • @BiserAngelov1
    @BiserAngelov1 2 месяца назад

    The king of dumbest terminal things for me, is the DD command, but i press the wrong digit for the partition number.

  • @mdm8547
    @mdm8547 3 месяца назад

    They say that you learn from mistakes, but still the main thing is not to lose concentration, sometimes one space in the path to the file is enough to install the system again. And no one is immune from this.

  • @n3kosis
    @n3kosis 3 месяца назад

    Hey DT,
    Could you maybe talk about IceWM again and compare it to Openbox?

  • @MrSociofobs
    @MrSociofobs 3 месяца назад

    I almost caught a heart attack after formatting a drive I thought wasn't the right one for a second. I have 5 drives connected with only one of them meant for Linux. I didn't know that the drive names (sdb, sdc, sdd etc) can CHANGE after rebooting a live iso.

  • @simpleprogrammingcodes
    @simpleprogrammingcodes 3 месяца назад

    With repositories it's not that easy. For example I am on Ubuntu. But I use the Python repository and the Haskell repository. Other languages such as R, Common Lisp or Rust can also have their own repositories. And sometimes these repositories can have conflicts with the OS repositories. So if you use some of these programming languages, it's almost impossible to not use other repositories.

  • @amy_grace
    @amy_grace 2 месяца назад

    One time I was installing a custom auth module in /etc/pam.d and completely broke my system's ability to verify passwords. That was a tricky one to troubleshoot.

  • @kadse417
    @kadse417 3 месяца назад

    Installing nVidia Drivers on openSUSE before doing a Kernel update. Therefore I switched to AMD.

  • @MarioCamou
    @MarioCamou 3 месяца назад +1

    rm -rf * without checking the cwd. It was root. It's amazing how long the system continued to work.

  • @pierrebertram5555
    @pierrebertram5555 2 месяца назад

    adding my usb drive to etc/fstab and after some time forget that i did that and after restarting without using that drive bricking my computer for some time.

  • @ivanlinuxandunix
    @ivanlinuxandunix 3 месяца назад

    I installed trash-cli and I put an alias rm='trash' in my .bashrc. That could help prevent stuff like that.

  • @facebookstaff7958
    @facebookstaff7958 3 месяца назад

    Fix permissions from a live usb. I usually add a user and test scripts in other user dir

  • @MasterHigure
    @MasterHigure 3 месяца назад

    I didn't want python 2 and 3 to get mixed up on my Ubuntu 20.04, so I removed python 2. That did not go over well.

  • @roracle
    @roracle 3 месяца назад

    Maybe I just never made those mistakes because I learned what did what first. Even when I was learning this stuff back in the 90s, there were things I didn't have to do because I understood the function.

  • @fordonmekochgalenskaper5665
    @fordonmekochgalenskaper5665 3 месяца назад

    Only real dumb thing I've done was to format my /home drive when I reinstalled the system after a disc failure, I had backup, but took way more time than expected 😊

  • @michaelkreitzer1369
    @michaelkreitzer1369 2 месяца назад

    The biggest "don't" of this video is the one that's implied. Don't find yourself without tested, complete, bare metal, external, daily backups of your system. All of these mistakes are quickly fixed.
    "All of my important files are backed up" is a trap. It requires perfect accuracy in initially identifying which files are important, perfect accuracy in maintaining that list over time, and even if you managed both of those makes recovery tedious and time consuming.

  • @gregf9160
    @gregf9160 3 месяца назад

    I hate to say I've done the same 😬 I think we all must have done at least one or two of these 🤣 It does teach you (at least it did with me) to _pay close attention_ when running any of these commands in a terminal ...

  • @ringo8410
    @ringo8410 3 месяца назад

    Even if it's not sudo rm -rf, you always have to be extremely careful about how you use rm. I try to write that command with as much specificity as possible, because like every other Linux user in existence, I have messed myself up in the past by recklessly throwing around rm.

  • @awa0927
    @awa0927 3 месяца назад

    I was once clicking around Synaptic package manager removing things here and there and accidentally removed xorg lol