Really Dumb Things I've Done On Linux

Поділитися
Вставка
  • Опубліковано 19 бер 2024
  • You've made mistakes on Linux. I've made mistakes on Linux. It happens.
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: ua-cam.com/users/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!
  • Наука та технологія

КОМЕНТАРІ • 350

  • @OraOraOra
    @OraOraOra Місяць тому +242

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

    • @aintnochange
      @aintnochange Місяць тому +8

      I feel that bro 💀

    • @kellypainter7625
      @kellypainter7625 Місяць тому +56

      Installing Windows. There fixed that for ya

    • @aditya_yadav_047
      @aditya_yadav_047 Місяць тому

      lol 😂​@@kellypainter7625

    • @Proferk
      @Proferk Місяць тому +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 Місяць тому +9

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

  • @Andrath
    @Andrath Місяць тому +129

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

    • @Cyber_Gas
      @Cyber_Gas Місяць тому +3

      Yea

    • @soulstenance
      @soulstenance Місяць тому +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 Місяць тому +2

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

    • @littlepeon
      @littlepeon Місяць тому +14

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

    • @TiagoEgas
      @TiagoEgas Місяць тому +1

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

  • @LaserFur
    @LaserFur Місяць тому +80

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

    • @anitamaxcode
      @anitamaxcode Місяць тому +6

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

    • @mvandios
      @mvandios 28 днів тому +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 19 днів тому +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

  • @evantaur
    @evantaur Місяць тому +13

    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

      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.

  • @huljaxful
    @huljaxful Місяць тому +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 Місяць тому +9

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

    • @peterschmidt9942
      @peterschmidt9942 Місяць тому +4

      Time for a new battery perhaps?

    • @aristokatclaude3413
      @aristokatclaude3413 Місяць тому +2

      Gentoo enters the chat

  • @skytale35
    @skytale35 Місяць тому +51

    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 Місяць тому +8

      ransomware without ransom

    • @no_name4796
      @no_name4796 19 днів тому +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 16 днів тому

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

  • @thewizard2567
    @thewizard2567 Місяць тому +7

    Oh yes, I have done some fun things with debian before the latest release to get testing working. When your manager asks you "what did you do this weekend" and you proudly say "I installed debian testing", you know you need to take a hard look at your life.

    • @no_name4796
      @no_name4796 19 днів тому

      Why install debian testing though? There are better bleeding edge distros (arch, fedora, opensuse,...)

    • @thewizard2567
      @thewizard2567 19 днів тому

      @@no_name4796to try it out. The Debian install media would not work on my computer even. I went to someone’s house for the weekend and brought my laptop with no OS on it and a usb that had fedora install media on it. I installed it like I would gentoo. Was a good exercise and fun.

  • @AQDuck
    @AQDuck Місяць тому +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 Місяць тому +10

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

    • @nolan412
      @nolan412 Місяць тому +3

      Use /dev/disk/by-*

    • @variancewithin
      @variancewithin Місяць тому +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

      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 Місяць тому

      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)

  • @the1trancedemon
    @the1trancedemon Місяць тому +20

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

  • @Maxume
    @Maxume Місяць тому +26

    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 Місяць тому

      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 Місяць тому +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 28 днів тому

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

    • @1pcfred
      @1pcfred 28 днів тому

      @@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.

  • @tenj00
    @tenj00 Місяць тому +22

    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 Місяць тому +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 Місяць тому +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 Місяць тому +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 Місяць тому +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 Місяць тому

      @@PabloparsilNo risk no fun

  • @paulfrank8738
    @paulfrank8738 Місяць тому +7

    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.

  • @friedrichdergroe9664
    @friedrichdergroe9664 Місяць тому +5

    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.

  • @AkamiChannel
    @AkamiChannel Місяць тому +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.

  • @tiitulitii
    @tiitulitii Місяць тому +12

    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.

  • @LuealEythernddare
    @LuealEythernddare Місяць тому +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.

  • @ForeverZer0
    @ForeverZer0 Місяць тому +10

    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.

  • @superangrybrit
    @superangrybrit Місяць тому +21

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

    • @leighsaunderson9203
      @leighsaunderson9203 Місяць тому +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

      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

  • @usopenplayer
    @usopenplayer Місяць тому +12

    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 Місяць тому +6

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

    • @usopenplayer
      @usopenplayer Місяць тому +1

      @@nolan412 Thank you!!

  • @shreyasas3128
    @shreyasas3128 Місяць тому +19

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

    • @moussaadem7933
      @moussaadem7933 Місяць тому +3

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

    • @shreyasas3128
      @shreyasas3128 Місяць тому +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 Місяць тому

      @@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

  • @sumanmondal4251
    @sumanmondal4251 Місяць тому +8

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

    • @sfwnsft
      @sfwnsft Місяць тому

      Fr bro.

    • @javabeanz8549
      @javabeanz8549 Місяць тому

      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.

  • @paulsander5433
    @paulsander5433 Місяць тому +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

    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.

  • @Seofthwa
    @Seofthwa 21 день тому +2

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

  • @mariolis
    @mariolis Місяць тому +5

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

  • @user-rq3hz8yh4t
    @user-rq3hz8yh4t Місяць тому +3

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

  • @kachmar1
    @kachmar1 Місяць тому +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

  • @torspedia
    @torspedia Місяць тому +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! 🙂

  • @donpeer4477
    @donpeer4477 Місяць тому +3

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

  • @DV-ml4fm
    @DV-ml4fm Місяць тому +9

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

    • @javabeanz8549
      @javabeanz8549 Місяць тому +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 Місяць тому +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 Місяць тому +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.

  • @Tanmaydeshpande-ne9gc
    @Tanmaydeshpande-ne9gc Місяць тому +14

    my dumbest thing pretty bad
    i was installing sonic 3 from aur and needed to move a file from downloads to a specific nested folder path that didnt exist. i read a command to move with creating the directory. but the name had a space so i put it in quotes. that create a folder called ~ in downloads.
    then i rm rf ~
    the command took longer than i expected

    • @soulstenance
      @soulstenance Місяць тому +2

      Noooooo!!! You nuked your home directory? 😱

    • @iodreamify
      @iodreamify Місяць тому +3

      rm really should prevent or at least ask about removal of ~ or /home folder. like they do with with --no-preserve-root.

  • @hansdampf2284
    @hansdampf2284 Місяць тому +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

  • @michaelkreitzer1369
    @michaelkreitzer1369 18 днів тому

    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.

  • @occultsupport
    @occultsupport Місяць тому +73

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

    • @user-mf6cu5xj3v
      @user-mf6cu5xj3v Місяць тому

      :q there you go

    • @Winnetou17
      @Winnetou17 Місяць тому

      Press and keep Shift and double tab Z there you go

    • @enriqueleon4806
      @enriqueleon4806 Місяць тому +2

      I turned off my computer jaja

    • @da_roachdogjr
      @da_roachdogjr Місяць тому +1

      @@enriqueleon4806 😂😂😂

    • @soulstenance
      @soulstenance Місяць тому

      @@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.

  • @GeekIWG
    @GeekIWG Місяць тому +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. 😅

  • @shutdowncnn6086
    @shutdowncnn6086 Місяць тому +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 !

  • @thgreenshaman8503
    @thgreenshaman8503 Місяць тому +12

    DT needs some tropical fish in the background.

  • @enderger5308
    @enderger5308 Місяць тому +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.

  • @deni64k
    @deni64k Місяць тому +2

    I love the new look!

  • @Hyperboid
    @Hyperboid Місяць тому +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.

  • @Subh8081
    @Subh8081 Місяць тому

    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.

  • @zeckma
    @zeckma Місяць тому +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.

  • @aiyegba3049
    @aiyegba3049 Місяць тому +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.

  • @lgajai
    @lgajai 27 днів тому

    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.

  • @jacobwerner8533
    @jacobwerner8533 Місяць тому +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.

  • @NimhLabs
    @NimhLabs Місяць тому

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

  • @igorb4650
    @igorb4650 Місяць тому

    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

  • @txm.091
    @txm.091 Місяць тому +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

  • @dannyboy42223
    @dannyboy42223 Місяць тому

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

  • @OcteractSG
    @OcteractSG Місяць тому

    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.)

  • @c99kfm
    @c99kfm 21 день тому

    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.

  • @StopTheNewWorldOrder322
    @StopTheNewWorldOrder322 Місяць тому

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

  • @MaartenT
    @MaartenT Місяць тому

    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.

  • @rufine4114
    @rufine4114 Місяць тому

    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`

  • @Winnetou17
    @Winnetou17 Місяць тому

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

  • @mitchell6you
    @mitchell6you Місяць тому

    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..

  • @GamingWithUncleJon
    @GamingWithUncleJon Місяць тому

    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

  • @AlmondCheese
    @AlmondCheese Місяць тому +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.

  • @hansdampf2284
    @hansdampf2284 Місяць тому

    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.

  • @wilson713
    @wilson713 Місяць тому +2

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

  • @ikarm
    @ikarm Місяць тому

    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 Місяць тому

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

  • @1400Lines
    @1400Lines Місяць тому +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 Місяць тому

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

  • @ItsCryptic
    @ItsCryptic Місяць тому +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

  • @RaviRJoshi
    @RaviRJoshi Місяць тому

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

  • @UnruheRevan
    @UnruheRevan Місяць тому

    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

  • @danieleg8758
    @danieleg8758 Місяць тому

    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

  • @ChadsHobies
    @ChadsHobies Місяць тому

    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.

  • @teenspirit1
    @teenspirit1 Місяць тому

    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.

  • @docopoper
    @docopoper Місяць тому

    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.

  • @fredmckinney8933
    @fredmckinney8933 Місяць тому

    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.

  • @n3kosis
    @n3kosis Місяць тому

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

  • @fordonmekochgalenskaper5665
    @fordonmekochgalenskaper5665 Місяць тому

    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 😊

  • @gregf9160
    @gregf9160 Місяць тому

    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 ...

  • @kadse417
    @kadse417 Місяць тому

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

  • @gassug2
    @gassug2 Місяць тому

    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

  • @MrSociofobs
    @MrSociofobs Місяць тому

    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.

  • @j_t_eklund
    @j_t_eklund Місяць тому

    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..

  • @KrisRogos
    @KrisRogos Місяць тому +1

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

  • @AM-yk5yd
    @AM-yk5yd Місяць тому

    I never ran dd wrongly in ~30 years of linuxing. But that's mostly because I distrust myself and always do fdisk first to make sure I aim dd where I intend. Then I ctrl-c and change fdisk to dd. Always. No exception. Even if I write several sd cards in row. Now other stuff, like incorrect recursion and deleting packages I didn't mean to... Yes. So much yes. I think I uninstalled DE once, only "default" x booted (the one with static background) and even afetr installing DE it didn't setup itself correctly.
    Partial upgrades becamse less threat now when flatpak exist. So until flathub fails, it becamse much better. I can't imagine what a pooshow will happen once flathub goes offline for reasons that nothing is permanent (remember ftp cdrom?).
    Also messing up with grub. You either got lucky to never mess it up or forgot it or I skipped it.
    So many times I've installed grub where it didn't belong. I didn't mistype anything, I just chose incorrect drive. So once I removed drive that I thought was "secondary", my whole system no longer worked.

  • @melbaqir
    @melbaqir Місяць тому

    I've done most of those mistakes, just recently i wiped out the entire /etc folder using rm -r , i had t reinstall all again😀

  • @richirich1757
    @richirich1757 Місяць тому +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.

  • @peterschmidt9942
    @peterschmidt9942 Місяць тому +1

    After using Linux for a few years now, sometimes things just happen. And while it might be nice to understand what you've done to stuff your system, sometimes it's just quicker and easier to blow it away and start again. And you're back up and running in 30min or less.
    My biggest Linux mistake? Doing any updates to Manjaro 😂🤣

    • @Syl4r93
      @Syl4r93 Місяць тому +2

      Man, when I used to run Manjaro I got my system destroyed by updates so many times....now I have been running Endeavour for a couple years, and it hasn't happened once...I was so scared to update in the beginning 😂

    • @peterschmidt9942
      @peterschmidt9942 Місяць тому

      @@Syl4r93I know what you mean. I tried all sorts of ways to update, always had problems afterwards and generally needed to reinstall. After trying out a few Debian distros I ended up on Fedora and much happier. I spend more time using it than fixing things I shouldn't have to.

  • @Ryet9
    @Ryet9 Місяць тому +1

    rm -rfv`d /run a few times with a mounted USB DRIVE... more than once...

  • @mdm8547
    @mdm8547 Місяць тому

    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.

  • @blank-mq8ef
    @blank-mq8ef Місяць тому +1

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

  • @rostislavsvoboda7013
    @rostislavsvoboda7013 Місяць тому

    Literally two hours ago `guix package --list-generations=...` together with `guix package --switch-generation=...` pinpointed the package breaking my setup and the restored my machine... in less then 5 minutes.

  • @MarioCamou
    @MarioCamou Місяць тому +1

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

  • @jdasnake81
    @jdasnake81 Місяць тому +5

    This may be the most relatable video you have made!
    I try to make my rm -rf commands as specific as possible. I have had friends use rm -rf * to delete the correct files but then accidentally rerun the command from their shell history in the wrong place later.

    • @summerishere2868
      @summerishere2868 Місяць тому

      If possible I just use a gui file explorer as root. It's way safer.

  • @amy_grace
    @amy_grace 16 днів тому

    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.

  • @mvandios
    @mvandios 28 днів тому

    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 :(

  • @chevvvv
    @chevvvv 9 днів тому +1

    I accidentally nuked my Linux Mint partition when I was reinstalling Arch lol

  • @facebookstaff7958
    @facebookstaff7958 Місяць тому

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

  • @shashankmshanbhag7970
    @shashankmshanbhag7970 Місяць тому

    I've done all of these and learnt a lot 🎉😅

  • @roracle
    @roracle Місяць тому

    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.

  • @lePirateMan
    @lePirateMan Місяць тому +1

    I once reformated my home partition on a live system

  • @ozmosyd
    @ozmosyd Місяць тому

    Much appreciated and thanks for sharing. Thanks man,

  • @ringo8410
    @ringo8410 Місяць тому

    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.

  • @seanfaherty
    @seanfaherty Місяць тому

    I wonder how many of these I have done all the times I didn’t know what the hell I did
    - OK some of these things he mentions explain some of those mysteries