Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does the system work when you give just a root and swap partition vs partitioning /tmp /usr /local...etc?
In other words those partitions are "virtual" for lack of a better term when you just go root and swap... which means that there size is dynamic vs static and you don't have to worry that your, say /usr partition will run out of room if you add and more data to it because you partitioned it at only 1gig vs 3....
So is there really any good reason to manually partition them in the 1st place?
here's how mounting works.
when you mount a partiton, it adds it to the root fileTree.
if you have a seperate partiton, and mount it as /tmp
whenever a program accesses /tmp/ linux will map it to the partiton mounted there.
if no partiton is mounted there, then when a program accesses /tmp linux works its way back to the next mount point it finds... which is / and puts the data in that partiton under the folder /
there is nothing virtual about it.
just sometimes there are advantages. for example.. lets say you abuse your root acount, and damamge linux badly. you need to format and re-install.
IF your /home directory, /tmp and /var directorys are all on seperate partitons, you can format your / partiton, and re-install linux without loosing your personal files, emails, program setttings OR program logs.
of course the downside to this, is not every1 had hundreds of GiG free space, and if a partiton runs out of space, re-sizeing is annoying !
Originally posted by Thaidog But when you partition like that... / and swap... all the other partition get bigger the more files you put in them right?
No, because you only have one partition. All of the files in all of the other directories including /tmp, /usr /var etc are part of the / partition. The more files you put in them the more you fill up /.
As a windows analogy think of the / root partition as c:\ and /var as c:\var, /usr as c:\usr etc. When you add files to c:\var your filling up c:\, c:\var does not get bigger.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.