Glock Forum - GlockTalk banner

1 - 9 of 9 Posts

·
Registered
Joined
·
1,142 Posts
Discussion Starter #1
Ok, This is probably a stupid question, but here goes:

What are the pertinent folders in Linux and what do they do?

As a for instance, in Windows:
C:\Windows is operating system stuff that I try not to mess with unless I'm CERTAIN I know what I'm doing.
C:\Program Files is where all the apps are installed to.
and all the "My BLAH" folders (My Music, Videos, Pictures, etc) are meant to house large files rarely used by the system and, when I use them, they're on a second harddrive.

What are the analogs in Linux? Where should I install programs to? What folders should be on second partitions/hard drives to speed up the computer? Thanks!!!!
 

·
Registered
Joined
·
27,983 Posts
A lot depends on the distribution you've got..

*General* rule of thumb...

If the folder is a sub directory of /home/username, and has a . in front of the folder name, you should avoid making changes there unless you're following instructinos to do so, or know what you're doing. Those are the program file folders, and files in there basically make the program run properly... If you screw them up, worst you'd have to do I guess is reinstall the program. On most systems, the folder with "." before them, are hidden by default, but you select "Show hidden folders" in the view menu, and they will show up.. Here's an example of a few of them.

/home/indygunfreak/.wine Is my wine folder
/home/indygunfreak/.gnomebaker is my folder for Gnomebaker(CD/DVD burner utility)...
/home/indygunfreak/.googleearth .. is for Google Earth

and so on with one . subdirectory for each program.. Avoid anything under /root, and /usr/bin you really shouldn't be doing much with either.. These two you can do damage in, especially if you're doing things as root. 99% of programs you install, will default install to /home/username/.program_name so if you don't modify the install paths, thats where most programs are gonna end up(and thats where you should really leave them).

I'm not really sure I understand you're question about speeding up your computer.

IGF
 

·
Registered
Joined
·
1,142 Posts
Discussion Starter #3
IGF,

Thanks for the response.

The confusion may come from the fact that I'm still thinking about things from a Windows perspective, but...

On Windows, I put all my video files, music, archived junk and other things that I won't use regularly on a separate partition or hard drive. That way, C:\ is just for windows files and program files. So, when I install a program it won't be need to be fragmented amongst my media files, archived email folders, old class homeworks, etc.

So, it sounds to me like the Linux /home folder is an approximation to the C:\Program Files folder on Windows. So, which folder should I put on the last partition or a second HDD to house files which aren't modified or accessed often?

for instance, I've got a dual boot hda1 is /boot, hda2 is WinXP, and hda3 is my / partition. Now, I've got a second hard drive for all my music, videos, email folder etc.

So, what should I denote hdb as in Linux? In the past I've just made a new folder called /storage which pointed to hdb1, but I need to re install and want to do it right this time.

Also, as an add on question, if I have multiple users (say root, user1, and user2), how do I install programs that I want accessible to everyone? That is to say, if install thunderbird while logged in as user1, will it create a /home/user2/thunderbird directly and allow user2 to access it?
 

·
Registered
Joined
·
27,983 Posts
IGF,

Thanks for the response.

The confusion may come from the fact that I'm still thinking about things from a Windows perspective, but...

On Windows, I put all my video files, music, archived junk and other things that I won't use regularly on a separate partition or hard drive. That way, C:\ is just for windows files and program files. So, when I install a program it won't be need to be fragmented amongst my media files, archived email folders, old class homeworks, etc.

So, it sounds to me like the Linux /home folder is an approximation to the C:\Program Files folder on Windows. So, which folder should I put on the last partition or a second HDD to house files which aren't modified or accessed often?

for instance, I've got a dual boot hda1 is /boot, hda2 is WinXP, and hda3 is my / partition. Now, I've got a second hard drive for all my music, videos, email folder etc.

So, what should I denote hdb as in Linux? In the past I've just made a new folder called /storage which pointed to hdb1, but I need to re install and want to do it right this time.

Also, as an add on question, if I have multiple users (say root, user1, and user2), how do I install programs that I want accessible to everyone? That is to say, if install thunderbird while logged in as user1, will it create a /home/user2/thunderbird directly and allow user2 to access it?
I've generally just set the hdb as storage, and put all my media files that I want shared, there. As for allowing access to all files, etc.. That would require some user/group management.

You could make a new Group, add your two users to them, then set the permissions on whatever you're wanting both users to access, to the group you've added both users to. I'm probably making it sound more complex than it is, but again, you'll just have to do some user and group managing. I don't generally manage users this way. If I want user2 to have access to Thunderbird, then I install thunderbird under user2, and they have access to it... because remember, it would essentially be a separate install under user2..(/home/user2/.thunderbird)...

IGF
 

·
Registered
Joined
·
978 Posts
On Windows, I put all my video files, music, archived junk and other things that I won't use regularly on a separate partition or hard drive.
Just create a directory structure that is neat and easy to maintain. You can deal with making them different partitions or disks later.

*nix filesystems are great with fragmentation, so that is rarely an issue. One reason to do this on windows was for performance (page file and apps on same drive), if given enough memory, you shouldn't have to worry about swapping.

So, it sounds to me like the Linux /home folder is an approximation to the C:\Program Files folder on Windows.
Nope... Home would be more like C:\Documents and Settings, where all the users directories are.

So, what should I denote hdb as in Linux?
This is where you keep media, right? You can mount the windows partition in linux too, ya know? I'd do something like /mnt/media or maybe just /media.

How do I install programs that I want accessible to everyone?
This is all about permissions on the files. Many programs install where other users can run them as well. If they are running it from the command line, they might need to fully qualify the command if it isn't in there PATH.
 

·
Registered
Joined
·
629 Posts
Check out this page for a rough idea of what each directory is for:
http://www.geocities.com/sunnylug/lindir.html

Keep in mind that different distros have their own take on where they like to put things.

One thing to note that is disorienting to new users: separate drives, partitions etc. get "assigned" to folders in the directory tree when they are mounted. You can have entire partitions that look and act like folders within the linux filesystem. For example, my home folder is where I keep all of my docs and media (think My Documents in Windows.) However, when I set up my Linux I designated the home folder as its own partition.

So, while the home folder looks like it is "inside" the root directory on the file tree, all of the home folder stuff is sitting on a completely different partition.

I do it this way because I store everything in my home folder, and it's a single-user system. Having an all-access "stuff" partition should work ok for multiple users, if permissions are set right. I think you just set the permissions for that drive/partition to "everybody can read/write" if I'm not mistaken.
 

·
Registered
Joined
·
1,142 Posts
Discussion Starter #8
Hey guys,

Thanks for all the responses. I've got a much better understanding of the file folders now. Still got a little confusion, but I think trial and error will fix that :)
 

·
Edge Of Reality
Joined
·
382 Posts
C:\Program Files is more like /usr/bin or /usr/local/bin or similar on Linux.
/home/[username] is similar to your C:\Documents and Settings\[username].

Here is another good site with some good info:
http://www.tldp.org/LDP/intro-linux/html/chap_03.html
Go to the top of that book and leaf through it, a lot of good stuff, but the link is to the specific chapter about Linux filesystem which is directly pertinent to your question.

If you have more questions bring em and we'll try to answer em for you :).
Always good to see more people interested in Linux.

Welcome to the dark side :supergrin:
 
1 - 9 of 9 Posts
Top