The Linux Directory Structure Simply Explained

preview_player
Показать описание
In this video, I take a quick look at the Linux filesystem and how it is structured.

WANT TO SUPPORT THE CHANNEL?

Please like, share and subscribe. And check out my Patreon page:

Your support is very much appreciated. Thanks, guys!
Рекомендации по теме
Комментарии
Автор

The reason that "/root" is its own directory as opposed to "/home/root", is due to the fact that the /home directory is usually on a separate partition. However, it is best practice that the root partition ("/") alone could be used to to run the OS, even if other partitions were not mounted (for whatever reason). This is why the home directory of the root user is left independent, so that the root user can login even when the /home partition is not mounted.

zaidgs
Автор

The reason why it's so convoluted and confusing is because this kind of file system structure dates back aeons ago. Most of those folders are there for historic reasons and/or backward compatibility with older software. Basically in these days and age, for the user own personal stuff, you can pretty much go with whatever you preferences are. You probably noticed that a lot of developers uses tons of symlinks and hard links, mostly on pre-installed stuff.

SebSenseGreen
Автор

Most stuff I was familiar with, but again learned some useful new sthings.
btw, I like you vary between the more basic/easy subjects and the more advanced.
Thanks DT, for another very useful vid!

tubelarasa
Автор

Nice video - I always seem to learn something new in your videos, like Ranger. I'm really loving Ranger. It uses most of the same keyboard shortcuts as MC, my staple since the 90's. Thanks DT.

jjlapierre
Автор

I think I watched this video like 2 years ago and almost did not understand anything, now with more experience using GNU/Linux I can understand a lot of things =)

hasecilu
Автор

I always thought /usr meant 'universal system resources'

henrymach
Автор

Thank you for this as I used to rip apart winblows back in the day just to deal with a reinstall and find myself with some of the same problems. And learn a little more, as time went on I had become lazy and just dealt with work around's and other BS to get the computer to work the way I wanted it to.

Gracias Amigo!
You are shining star to those of us who wanna drag themselves out of a hole...

EvilStepTwin
Автор

Hello from New York City! Which file manager are you using? Thank you for your informative video.

PuchoWebSolutions
Автор

Great vid DT! usr "unix system resources"
I've really learned to like the look of ranger too.

qfiend
Автор

Correct me if i'm wrong, but i'm pretty sure the etc folder holds system-wide configurations, while ~/.config will only make changes per user.

eddie
Автор

Just found out "dev" means devices and NOT development. My bad.

zanaris-falador
Автор

Hello sir Thank you for your precious information. I just wanted to ask that since in /var directory, the data changes all the time then why the data in the folder /var/www/html does not change and the files remain constant?

vivekmahajan
Автор

one thing i always wondered why is for the /opt/local and /local and /usr/local, why the three local folders ?

jmm
Автор

The /tmp folder normally gets cleared during the next boot.

Thorpe
Автор

/usr stands for Unix System Resources.
Also there is nothing wrong being in run folder, at least in /run/shm which is tmpfs - temporary file system, stored in RAM.
So you can save something in this folder you just need for a moment and you don't want to waste your ssd drive (unlike hard disk drives, ssd drives have a limited number of write cycles).
Contents of the folder will be deleted when the system is shut down. On Debian Buster (10) there is /dev/shm instead of /run/shm, serves the same purpose.
Jut execute df -h to find where it is on your machine.
Bear in mind that /run/shm (/dev/shm) has a limited size. If you exceed it, the data will be saved to disk instead of RAM.
Typically I delete folder Downloads in my home folder and create symlink to /run/shm (or /dev/shm).

GreyDeathVaccine
Автор

Things I normally place in the /opt directory are things like the JAVA jdk that I download (Running manjaro) so I have to use the tar.gz download. I also run pycharm which I normally place in /opt. I could probably place both of those in my ~/bin but it has become my goto since using AIX 4.7 and I guess muscle memory takes over sometimes.

bsdtux
Автор

dude how bout enlarging your fonts, only complaint in otherwise fantastic video

raypasour
Автор

Man, it's just so much of an mess. And doesn't really follow any intuitive structure.
And /usr is one of the most annoying folders as it's the place where you are supposed to install and modify your programs.
Just go for something like root/programs/"global" and "user"/"lib" and some folder where all the individual programs have an subfolder that includes all the required files and documentation for the particular program.

I know that you can't just change filesystem willy nilly, but there isn't really ever going to be good time to do so. So why not as soon as possible.
You could also change root to something like /system, /home, /programs and /temp.

mukkaar
Автор

this guy just turned on the camera and started talking. Could've at least done some research on those directories before "teaching" about them.

aje