Click to See Complete Forum and Search --> : /home


Convert
02-04-2001, 04:28 AM
I reinstalled mandrake today, but i chose auto partition for the first time. It made a / anda /home partition. What goes in the /home and what goes in the /. Normally i just make a swap and one BIG /. Now i am confused of what to put in this newly found /home partition. I like my OS to be neat and organized so this is driving me crazy!!!! :eek:

Ryeker
02-04-2001, 04:32 AM
Hopefully Windows terms will help.

Think of / as all your hard drives, like one big C partition. Well, some people like to have their My Documents folder stored on D. That way, when they reformat C, they don't loose D. Putting /home on D is basically the same idea. /home is where all your users store their files; this is where their home directories are stored.

Convert
02-04-2001, 04:39 AM
Oh, so /home is like My Documents in windows. Why is it a separate partition, and why is it larger than /. I am really confused on this whole *nix directory structure. Please explain.. :confused:

Ryeker
02-04-2001, 04:43 AM
It's a separate partition so in case something bad happens to the root (/) partition, you'll still have your /home. In the old days, /home would be on a separate hard drive, or possibly on a RAID. It's bigger because you should be storing all your files there (to be tidy). When you download stuff, it should be in /home/<username>. Got it?

Convert
02-04-2001, 04:50 AM
Hmm... starting to make sense.. just one more question:

Do i install programs i home, only documents, pictures, and porn.. right?

Programs go in the bin and sbin directories like in Solaris, right.

Last thing, why is there a bin and an sbin?

Ryeker
02-04-2001, 04:56 AM
One more thing, /home is where home directories are stored (except for /root, the home for root). So if your username on your box is convert, your home directory would be /home/convert. If you gave me an account, it would be /home/ryeker.

Yes, you can install programs into your home directory. Then only you can use them. You can store anything you want, like your documents, pictures, warez, porn, (LOL...) etc...

Yes, there is a /bin and /sbin and a /usr/sbin.

Q-Gdoxl
02-04-2001, 04:57 AM
Thanks guys I recently installed Red Hat 7 on a 3 gig partition and tried to install some stuff and suprisingly run outta HDD space. This explaines it! :)

X_console
02-04-2001, 12:45 PM
It's recommended that you split up your hard drive into multiple partitions, not just / and /home. Eg:

/ = root partition
/home = users and their files
/usr = programs you install (C:\Program Files)
/var = where all the log files go to and other stuff like mail and so on
/tmp = temporary files that are deleted

The / partition doesn't have to be huge. I normally allocate about 80-100MB on mine to be on the safe side.

/home can be as large as you want, depending on how many users you're going to have, or just how much you think you'd like to store in your home directory. It's recommended that you make this at least 100MB or greater since if you're going to download something, it's normally gonna be less than 100MB, and this is where it's going to be stored.

/var depends on how much logs you're expecting to get. If your machine is a firewall, then having /var big is a good idea since you're gonna get a lot of logs. Otherwise, 20-50MB should be fine, more if you can afford it.

/tmp is where temporary files created by users or programs go to. These files are (normally) deleted by the program that created them.

Why have a separate /tmp and /var? If /tmp and /var reside on your / partition (that is you don't have a separate partition for /tmp and /var) then anyone can fill up your / partition with useless files. Since anyone can create files in /tmp, what's to stop them from creating hundreds of 10MB files to fill up your / partition? If /tmp is separate however, then only /tmp will be filled up. Every other partition will remain functional. Same goes for /var. /var could be filled up by constantly attacking your firewall, or other syslog until your logs fill up the partition (this takes a much longer time, but it works).

Finally /usr is for those programs that you download and install. Normally they'll be installed in /usr/local or /usr/local/share

As Ryeker said, partitioning is good because if one of your partitions gets corrupted, you can fix just that one without having to worry about the other partitions.

milanuk
02-04-2001, 02:16 PM
As another example of why you want at a _minimum_ a separate '/' and '/home' partition, I have Linux running on the machine that the oldest boy has in his room. He went on an mp3-spree, making mp3's (and botched wav's) of his CD's. On that box, I originally just had a '/' partition and a swap partition. Not long after his marathon of making mp3's, he turned his machine off for some reason (still working on breaking that habit!), and then he couldn't log in. Neither could I. It seems that PAM couldn't write a temp file or something, and when I logged in as root, and ran 'du -hmc --max-depth=1 --exclude=proc', I found the /home directory to be full to the point of taking over the disk. I had to 'prune' his mp3 collection, and I later upgraded his box from RH6.2 to RH7.0, creating a /home partition in the process. Making separate /tmp, /var, /usr, /usr/local, yadayada partitions is a _very_ good idea on a server, or a firewall, or any other machine where resource consumption can result in a denial of service. But for your home desktop, you can probably get by w/ just a '/', '/home', and a swap partition. But hey, it's all about choice. So if you feel the need to go the extra mile, knock yourself out.

Monte

Lorithar
02-04-2001, 02:38 PM
*starting to grin since we're done the first cup*

/bin .. world accessible binaries..
/sbin ... sysadmin accessible binaries.
(usually)
if you look at the programs in /sbin and /usr/sbin you'll understand why we don't want all users to get at them.