Linux Crash Course - The /etc/fstab file

  Переглядів 94,419

Learn Linux TV

Learn Linux TV

День тому

In a previous video we went over the basics of storage, and in this episode of Linux Crash Course, I'll show you how to automatically mount storage volumes when you boot your server. The primary focus will be going over the /etc/fstab file.
☁️ Support LearnLinuxTV and Set up your own cloud server with Akamai Connected Cloud:
➡️ learnlinux.link/akamai
LearnLinuxTV Links:
🐧 Main site:
➡️ www.learnlinux.tv
🐧 LearnLinuxTV Community:
➡️ community.learnlinux.tv
Support LearnLinuxTV
📖 Check out Jay's latest book, Mastering Ubuntu Server 4th Edition. Covers Ubuntu 22.04!
➡️ ubuntuserverbook.com
🙌 Support me on Patreon and get early access to new content!
➡️ learnlinux.link/patron
🛒 Affiliate store for Linux compatible hardware/accessories:
➡️ learnlinux.link/amazon
💻 Check out the Tiny Pilot KVM for your Homelab:
➡️ learnlinux.link/tinypilot
About Me
🐦 Follow me on Twitter!
➡️ learnlinux.link/twitter
👨 More about me:
➡️ www.jaylacroix.com
➡️ www.learnlinux.tv
Recommended evergreen videos:
💽 How to create a bootable flash drive for installing Linux
➡️ linux.video/flash-usb
🐧 Understanding Linux permissions
➡️ linux.video/perms
🐧 OpenSSH Guide
➡️ linux.video/ssh
📖 LVM Deep-dive:
➡️ linux.video/lvm
🔐 How to better secure OpenSSH:
➡️ linux.video/secure-ssh
☁️ How to create a cloud Linux server with Linode:
➡️ learnlinux.link/create-linode
FAQ
🐧 Which distro do I use?
➡️ learnlinux.link/mydistro
💽 My recording gear (commissions earned):
➡️ learnlinux.link/recording-stuff
#LinuxEssentials #CLI #fstab

КОМЕНТАРІ: 133
@fentiger865
@fentiger865 Рік тому
Thanks for this. I find your explanations simple to understand but not in any way patronising. It's nice to have a basic understanding of how it works rather than the 'just write this and it will work' style of some other content providers. A new subscriber
@Jazztache
@Jazztache Рік тому
21:30 `lsblk -f` would be much better to run here, because it shows the UUIDs with the names, and the partition type, all in one table. This is super useful to get all of your information in one place.
@samuelitooooo
@samuelitooooo 6 місяців тому
Thanks for this. The presentation is cleaner too.
@CyperN077
@CyperN077 Рік тому
Thanks Jay this is a very good video. I like how you reiterate how cautious you must be in order to use the feature.
@ArchTechUws1542
@ArchTechUws1542 2 роки тому
Thank you for the videos, these 2 videos resume my classes into 1 hour.. great work.
@12Q46HPRN
@12Q46HPRN 2 роки тому
Thank you so very much! You have de-mystified fstab for me in a very patient yet non-condescending manner. You even explained what the final two digits (0 0) in each line meant. Again, thank you.
@markh2827
@markh2827 2 роки тому
Thanks Jay, very informative and easy to understand. Keep it up. Cheers 🙂
@kakarroto007
@kakarroto007 2 роки тому
Thank you SO much! While I found this information online, and probably could have bumbled my way through editing F-Stab, I still wouldn't have understood _why_ I was doing it.
@Ray_TambaBudol_Marcos
@Ray_TambaBudol_Marcos Рік тому
Thank you Jay! I love Linux. Next week I'm gonna have a Linux admin technical interview and one on of the topic is mounting samba and configuration of fstab. This is perfect refresher.
@jonathanrider4417
@jonathanrider4417 Рік тому
This was tremendously helpful for me - I have been using linux for more than 10 years and have never gotten my head around fstab. I recently added a 4TB drive and partitioned it into 4 - mounting until now as media - now finally I can mount the drive at startup. I would like to see a video about managing multiple drives on a PC that has 2 or more OS. You videos are the best because you explain things very well and include peripheral information along the way which is extremely useful for people like me!
@Douglas-hw8is
@Douglas-hw8is 9 місяців тому
Fully agree - great viid!
@magicmanj32
@magicmanj32 2 роки тому
Great video for a new Linux user, know how and why is a great learning tool, thanks
@kkkrrrr9024
@kkkrrrr9024 2 роки тому
Great work Jay! For me the best Linux channel. Greets from Munich.
@dankerman321
@dankerman321 2 роки тому
Thanks for explaining the fstab file... I was struggling with installing a 2nd HD in my laptop... the fstab file had errors which I could now fix. HD works now!
@Nixima81
@Nixima81 Рік тому
Thank you for this. One more baby step in my Linux journey.
@TR1ckY_TV
@TR1ckY_TV 2 роки тому
Great Tutorial! 🔥 please more of these sir 🙏🏻
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
I have several more on the way, being edited right now. I'm thinking by the end of next week or sooner, I'll have another tutorial in this series out. I probably have 4-5 of these still on my hard disk waiting to be edited.
@rickforges8918
@rickforges8918 2 роки тому
Just became a supporter on patron , always found your vids. great. Appreciate the detail , as sometimes the 'LITTLE' missed things get us 'Stuck' . Good content for newbie and intermediate as well. See you soon Jay !
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
Thank you so much, I appreciate the support!
@peterjansen4826
@peterjansen4826 2 роки тому
This is essential knowledge for every Linux-user, no exception.
@rossgeography
@rossgeography 8 місяців тому
exceptional tutorial - thank you!
@trapOrdoom
@trapOrdoom Рік тому
Yesss!! Thank goodness you started the video saying exactly what I needed to hear!!
@wildmanjeff42
@wildmanjeff42 11 місяців тому
Thanks for the video Jay !
@RonaldModesitt
@RonaldModesitt 2 роки тому
Very well and thoroughly presented! Many thanks.
@TON-vz3pe
@TON-vz3pe 2 роки тому
Your explanation is perfect.
@Douglas-hw8is
@Douglas-hw8is 9 місяців тому
Great vid - many thanks 👍
@MattiasMagnusson
@MattiasMagnusson 9 місяців тому
Thanks! You really made my day, forgot to setup the second drive as /var on my initial setup of my server, all sorts of crazy things happened in my homelab before that xD
@scottspa74
@scottspa74 10 місяців тому
Excellent explainer and tutorial! Thank you.
@duncan-mcrae
@duncan-mcrae Рік тому
Thanks. Such a good format for leaning Linux. Much appreciated
@LearnLinuxTV
@LearnLinuxTV Рік тому
Thanks for watching!
@G3Number
@G3Number 5 днів тому
Thanks for the video! Learned a lot❤
@opps5915
@opps5915 10 місяців тому
This channel better than university.. you are my love ❤❤
@daverawson123
@daverawson123 2 роки тому
So that’s what the 0s and 1s at the end of the lines mean🤔. Another brilliant vid Jay👏
@ogungbeopeyemi2684
@ogungbeopeyemi2684 8 місяців тому
Thank you so much for this… I really struggle starting my VM because of error in fstab.. this really helps 👍
@parthachoudhury4152
@parthachoudhury4152 Рік тому
Great explanation. Thank you so much.
@k4tipunb4yani12
@k4tipunb4yani12 2 роки тому
This is really helpful. Thank you.
@bytemylife
@bytemylife 9 місяців тому
this was awesome! thanks. I can't wait for you to do one on ZFS?!
@chromerims
@chromerims 5 місяців тому
Thank you for showing how to obtain UUID info to load into /etc/fstab 👍
@Frank-do1bg
@Frank-do1bg Рік тому
Thank you! Really helpful video.
@tongjojo901
@tongjojo901 Рік тому
amazing topic, thank you, great help.
@GuyManley
@GuyManley Рік тому
thanks. i built new pc and put arch on my old one. couldn't figure out how to add my 2nd HDD to it until i watch your 2 videos. cheers
@anas6435
@anas6435 Рік тому
Very informative and clear .. Can you please explain more Linux Storage topics? things like LVM and LUK
@kapiteinslaapkop7640
@kapiteinslaapkop7640 Рік тому
very helpfull and comprehensive lesson !
@Beyond1k
@Beyond1k 2 роки тому
Great tutorial!
@nicolasdavid6970
@nicolasdavid6970 Рік тому
Great video, learned a lot!
@FurikuriYugi
@FurikuriYugi 2 роки тому
Thanks, never thought to do that.
@ardeny100
@ardeny100 2 роки тому
Love your videos, keep it up
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
Thanks, will do!
@heckyes
@heckyes 10 місяців тому
Amazing content.
@comahrn
@comahrn Рік тому
such a good tutorial, thank you :)
@humzamuddasar1298
@humzamuddasar1298 Рік тому
Great video. Thanks
@BrucesWorldofStuff
@BrucesWorldofStuff 2 роки тому
Love the Linux Essentials videos... Thanks for the series, they are very helpful for a 4 year linux still new user... :-) HaHAHa I have done Oops thing several times because I for got a ( " ) here or there... Then have to USB in to fix it... Lol Thanks for the tips... I have to say the UUID is the best way to go. I have had drives change and cause all kinds of Thanks for the video Jay! LLAP
@muthukannanmurugachockalin7321
@muthukannanmurugachockalin7321 Рік тому
great lecture
@dragonek_gnu_linux_pl
@dragonek_gnu_linux_pl 2 роки тому
very important knowelage like always :). Mounting of disks are difrent than we have on windows so its good to know and understand it :)
@TedCorriveau
@TedCorriveau 2 роки тому
Thank you sir! I've been a linux user (not a guru) for a number of years, and have struggled to understand why even after adding the lines to the fstab, my local shares sometimes populate, and sometimes don't. Until I saw your video It didn't dawn on me that I was using a user-specific mount point /user/me/desktop/folder instead of /mnt .. feels stupid, but nice to know the real answer :) Thank You
@Ranblv
@Ranblv 2 роки тому
samba shares are not block devices. you can mount them from anywhere. I usually prefer /samba
@samuelitooooo
@samuelitooooo 6 місяців тому
16:00 After hitting enter, I got the message: `mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.` At least the mounting worked, according to lsblk. 21:13 WOW You were right. Before unmounting, my test flash drive was sdd1; it became sde1 when I mounted it again. 😅
@TheGnomophobe
@TheGnomophobe 2 роки тому
thx worked for me
@AndresLeonRangel
@AndresLeonRangel 2 роки тому
i had to write an incident report because of an issue with mounting an AWS EBS volume. I used the LABEL in the cloud-init script. Once you mount is OK, once you reboot that volume never mounts again. the PostgreSQL data was thought to be gone. But thank God issue was found and I fixed it. Always use the UUID
@LoveAnim3
@LoveAnim3 Рік тому
thank you!
@alexandersemigrodskikh8400
@alexandersemigrodskikh8400 2 роки тому
Good one.
@Hanagigi
@Hanagigi Рік тому
THANK YOU for helping me understand what the heck "^" meant! How could I even fathom that it means ctrl? Something new every day...
@BeeRich33
@BeeRich33 Рік тому
Might want to provide some clarity on UUID vs PARTUUID. I've also seen 8-character UUIDs.
@edbouhl3100
@edbouhl3100 Рік тому
Thanks!
@john-r-edge
@john-r-edge 2 роки тому
Great tutorial Thanos - i learned some new things. An option I have used sometimes is first to mount a new drive with a "mount" command. Then I look at the /etc/mtab file which gives list of all currently mounted items. I copy the line from mtab for the new disk and paste that into the fstab file. Then it mounts automatically. I think I used that because the mount command seemed easier than working out the fstab entry directly. Any benefits for that approach? Thanks.
@Yasinarbi
@Yasinarbi 10 місяців тому
Thank you
@sussusamogus7831
@sussusamogus7831 7 місяців тому
The order is a bit messy in the playlist. For instance, groups come before users, this comes before the "Formatting & Mounting" video, even though those videos come after the videos they are mentioned in. Anyways, great video as always!
@skrach37
@skrach37 2 роки тому
Thanks for the tutorial, very well explained. The thing is that my hard drive has a problem with superblock. Do you know where to find information to solve this? Been looking and there is to much information.
@stephanc7192
@stephanc7192 2 роки тому
Good video
@derelbenkoenig
@derelbenkoenig Рік тому
Very helpful video! One thing I am still wondering about is how disk encryption works here. I guess the system has to unlock the encrypted partition before being able to mount file systems but I am not sure how to accomplish that automatically on startup. Is that something also configured via fstab or elsewhere?
@chiforce
@chiforce День тому
Thanks Jay. I'm new to Linux and really appreciate your style of education. Please explain to me how you get the I between $ mount I grep sbd. I can not find that character on my keyboard
@wolfganggosejacob779
@wolfganggosejacob779 2 роки тому
good explanation, your system has crypted filesystems but your new sdb storage has not. can you explain (automatic) mounting of crypted fs because of the passwords? also mounting of samba shares and other network shares... with sense of internal or password files? thank you
@InmobiliariaPromueve
@InmobiliariaPromueve Рік тому
Great video. Do you know if there is a text editor I can use for ubuntu core in a Pi 3?
@peterjantzer4767
@peterjantzer4767 Рік тому
When working with system: Step one: Type in command Step two: REMOVE HANDS FROM KEYBOARD Step three: Verify command you typed is correct Step four (optional): Say short prayer Step five: Hit enter key
@DavidKHill
@DavidKHill Рік тому
Great video by the way. I have a question regarding the no auto. Can this feature benefit the wear and tear on disk? That is, if we run mount from within the script just during the time the backups are run, the umount the volume after the back ups are completed. This would shave wear and tear cycles off of the disk if it's not running. So having an unmounted disk connected to a server when it's no mounted, do you know if they're spun down during this time? Thanks.
@JoseLopez-oz1xm
@JoseLopez-oz1xm 2 роки тому
Very good vid, I would ask if you have done a video on OMV and how to mount nfs files auto into linux. Is it the same as this video?
@puppy_BYTE
@puppy_BYTE 2 роки тому
thanks, excellent, automounting a ssd drive, is it a good idea to make it default,noatime?
@stevefiorito5379
@stevefiorito5379 20 днів тому
Thanks for this video. I've had a hard time trying to wrap my head around how a computer identifies a particular drive: there is the OS assigned label (sda), the label that I give to the drive (my home drive), and the UUID. Knowing which to use has been more than confusing. I recently lost an external drive due to a power surge in our home electricity. I had to replace the drive and restore the files using a backup. The problem was that all of my custom folder icons were no longer working (my custom folder icon images are located on my boot drive, not my external drive). I thought that the solution was to simply "name" my new external drive as the failed drive was named. That did NOT work. So, the custom folder icon links are using something other than the user-assigned-name.
@debeeriz
@debeeriz 2 роки тому
l got caught out thinking the uuid was hard coded into the disks, saved the fstab file, reinstalled mint and compared the saved and new fstab files and the uuid's were completely different.
@cesarantonio1884
@cesarantonio1884 Рік тому
Good afternoon, Wanted to know if you can recommend a good Linux administrator course LCFS. I've been looking at different one but don't know much of it. Thanks
@symbioticparasite6268
@symbioticparasite6268 7 місяців тому
O man did I F up, needed to get the data of an NTFS drive ..... days of transfers, so I did it in steps, so I automatically mounted it in fstab, when I was done I needed to repartition the NTFS drive, I did, then forgot to delete the line in the fstab ..... it wasn't the same so when I rebooted..... I was locked out of my system because it couldn't find the F inga drive which was nonexistent by now ......
@GauteAnimationNorway
@GauteAnimationNorway 2 роки тому
This made mounting easy, but I can't set my steam library into the mounted harddrive. Which is what I need that extra space for. Doesn't an ext 4 work with steam? can't find the mounted folders at all to add a steam library in. I even created a mounted folder on home just to see for sure it isn't showing up on steam. On steam add library options it's pretty much invisible/non exisiting.
@Anbualex
@Anbualex 2 роки тому
Are you looking over my shoulder? lol I was looking at the fstab file last night.
@glenhathaway9131
@glenhathaway9131 2 роки тому
Same here
@buttdickenz
@buttdickenz 2 роки тому
Before doing anything I always back up important files, If I mess up I can then use a live environment and restore them
@NoEgg4u
@NoEgg4u 2 роки тому
From where does the "blkid" command derive the "UUID" value? How does the "UUID" value get chosen? Is the UUID some unique serial number that manufacturers put on their storage devices? If you buy 10 identical flash drives, your computer will somehow be able to tell them apart from each other, as each one will have a unique UUID. But how does your computer know which flash drive is which? What is it reading on the flash drive to determine which one has which UUID? Thank you.
@tomashley9246
@tomashley9246 Рік тому
Each drive has a small PCB that has the UUID embedded. It's like a MAC address. Unique to each piece of hardware.
@youkilledtony
@youkilledtony Рік тому
That's a fun file to mess up :-)
@Dr.Jerico
@Dr.Jerico 2 роки тому
hey Jay! some experts say that it is better to create a new file and not edit the actual fstab file. What do you say about it? Thanks for your great content btw.
@parthachoudhury4152
@parthachoudhury4152 Рік тому
It's always recommended to create a backup and then modify the original. Not just fstab but for any other file. You can always restore if required.
@Shohan11d
@Shohan11d 17 днів тому
Hello, I have a drive that is Bitlocker encrypted. It doesn't show the UUID of the drive using blkid cmd. it shows the partuuid but using partuuid doesn't work from my attempt. Is there any way I can mount Bitlocker drive at startup?
@abodawead9039
@abodawead9039 Рік тому
i got confuse about something , when i set the "ro" option to a volume that I use for back-up , how it will do the back-up ? I think i messed something in the video . thank you very much , great video and very useful one . 😁
@StaceyJenkinsdc
@StaceyJenkinsdc Рік тому
I’m also confused on the ro option. Is it read only for users other than root?
@abodawead9039
@abodawead9039 Рік тому
I try my best to find solution . but for now , set ro option for partitions managed by root user only . 😁
@chillnacho
@chillnacho Рік тому
I think the "ro" option is for only a computer that you don't want to allow to make changes to that volume. You aren't making changes to the USB drive itself. You can write to it on one computer and then plug it into another computer and it will be read only. At least that was my take on it. I was a little confused by how he said it too.
@babygravy9383
@babygravy9383 2 роки тому
What about network drives/shares?
@jbgrenouille2527
@jbgrenouille2527 2 роки тому
Greetings, I have tried many times to create automounts for disks in local network and it does not work for me, any advice?
@obfuscateidentity2329
@obfuscateidentity2329 2 роки тому
What about auto mounting a CD/.iso image ?
@eriksundell1400
@eriksundell1400 2 роки тому
Hmmm... if /etc/fstab is where the computer knows what storage to mount during startup, where is that file actually located?
@nexus384
@nexus384 Рік тому
how u mount a folder from the home directory like download
@ShankarDada010
@ShankarDada010 Рік тому
Haa how to take backup for cd /etc/fstab i want backup for fstab how to take please help with command ?
@davidwayne9982
@davidwayne9982 2 роки тому
QUESTION-- I have a USB stick (thumb drive-= whatever you like to call it) 134 GIG that I was going to install VENTOY to make a MULTI-BOOT drive-- and it refuses to format. I can run the formatter and it says "formatted successfully- but when I put it in the machine- it shows 125 gig- and will not allow the software I want to download. Ive redone it in EXFAT (which they recommend) -with same result--- SUGGESTIONS???? I can't find anything on this and no one to ask.
@submarine.7seas
@submarine.7seas 2 роки тому
is there a way to try mounting but don't hang the boot if fails? I have a little home server and the drive I used for web server dada died. When the server was rebooted it hung. I ended up having to PXE boot into a recovery and edit the fstab file.
@submarine.7seas
@submarine.7seas 2 роки тому
UUID=uuidnum1234 /mount/point ext4 default,nofail,x-systemd.device-timeout=1ms 0 0 ?
@davidwayne9982
@davidwayne9982 2 роки тому
PLEASE PLEASE can you make one on PERMISSIONS DENIED error in formatting..? I formatted one here in LMDE 5 while watching you discuss it in UBUNTU-- but I thought they would be pretty much the same for this... WRONG? or right?? HELP-- can't use my 2T Drive!!!!
@clivesgarage
@clivesgarage Рік тому
this is sooooo frustrating. I cannot find the previous video you talking about. I've searched everywhere. What is the title of the video please?
@MrCCnCMining
@MrCCnCMining Рік тому
Can I move my Home Directory to another Disk? I'd love to see a video for this for Linux Mint 20.3, for a drive that is already formatted and mounted. I'd at-least make a donation..........
@LearnLinuxTV
@LearnLinuxTV Рік тому
Not a bad idea actually! I might consider that. Thanks!
@1HandsomeDevil
@1HandsomeDevil Рік тому
And, fingers crossed, moving the /tmp directory as well?
@ShankarDada010
@ShankarDada010 Рік тому
Why no one is talking about taking backup
@vordreller6428
@vordreller6428 2 роки тому
What's the difference between fstab and mtab?
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
mtab shows what's currently mounted, fstab shows what you have configured for possible mounting.
@KeithWhittingham
@KeithWhittingham 2 роки тому
Chicken and egg question... How does Linux know where to find the fstab file if the drive it is on hasn't been mounted yet?
@avertry9529
@avertry9529 24 дні тому
If your scripted backup fails to mount your noauto mount, it will fill up your main drive instead.
@guilherme5094
@guilherme5094 2 роки тому
Like.
@davidgrishko1893
@davidgrishko1893 2 роки тому
AutoFS next?
@ajpenninga
@ajpenninga 2 роки тому
Yes please!
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
Already on the list, but thanks so much for suggesting that. I'm thinking that will land in my video queue in August at the soonest, maybe September depending on how my current queue goes.
@jorgemtds
@jorgemtds 2 роки тому
I am pretty sure that I have already mounted hard disks before without creating the folders in advance.
@LearnLinuxTV
@LearnLinuxTV 2 роки тому
It's certainly possible, there's all kinds of tweaks and adjustments, as well as distro-specific things that could've been in place to make something like that happen.
Linux Crash Course - Formatting & Mounting Storage Volumes
32:28
Learn Linux TV
Переглядів 210 тис.
Linux fstab File Basics | What you need to know
34:23
Joe Collins
Переглядів 10 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1 млн
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
skibidi toilet 73 (part 1)
04:46
DaFuq!?Boom!
Переглядів 30 млн
Linux Crash Course -  Managing Users
32:59
Learn Linux TV
Переглядів 91 тис.
18 Commands That Will Change The Way You Use Linux Forever
29:50
Akamai Developer
Переглядів 1,2 млн
Modernize your Linux Storage with btrfs!
46:34
Learn Linux TV
Переглядів 136 тис.
Auto mounting partitions using  '/etc/fstab'
10:12
David Dalton
Переглядів 9 тис.
10 Linux Terminal Tips and Tricks to Enhance Your Workflow
44:16
Learn Linux TV
Переглядів 88 тис.
Структура файлов и каталогов в Linux
20:28
Aleksey Samoilov
Переглядів 325 тис.
10 Typical Linux Problems and How to Fix Them
23:45
Learn Linux TV
Переглядів 51 тис.
Phone sees the future ! 📲🫣👽
0:38
BOGDANCHIKI
Переглядів 11 млн
Changing Replace And Edit Backgrounds New Tech || Photo Eedit NEW3X
0:50
Infrared Soldering Iron from Cigarette Lighter
0:58
ALABAYCHIC
Переглядів 1,7 млн