LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2014, 06:02 PM   #1
009jim
Member
 
Registered: Jun 2014
Posts: 53

Rep: Reputation: Disabled
I would like a file system tutorial


Gents, I played with Ubuntu about 5 years ago and still use it intermittently as the OS on my spare PC when I am solving hardware problems on my main windows PC. Lately I have a new (2nd hand) PC that I am readying to replace my main PC. I'm liking the idea of using Zorin and permanently leaving windows. However, it's often said that "the linux file system is completely different to windows" This I found true when I used Ubuntu. I was confused when I tried to do something simple like locating a file and copying to a place where I knew I could find it. With windows, most things end up in "my documents" and you can have sub-folders like "my family photos" etc. I need to be able to do something logical like this with my linux OS. What I would like is a tutorial on the linux / unbuntu / zorin file system. Please help.
 
Old 06-18-2014, 07:38 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Here is a general overview of the Linux file system.

The types of files you are concerned about are personal files which go into your /home/<your user name> directory.

Hint: learn how to use a web browser and a search engine such as google. The great majority of questions you may have are probably answered somewhere on the web. You can probably find answers faster by searching for them than by posting on a board and waiting for an answer. This should hold true unless you are using bleeding edge hardware or software specific to windows or mac os.
 
1 members found this post helpful.
Old 06-18-2014, 08:17 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,333
Blog Entries: 12

Rep: Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729
I've also sort of liked this site's explanation.

http://www.thegeekstuff.com/2010/09/...tem-structure/
 
Old 06-18-2014, 09:48 PM   #4
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Rep: Reputation: Disabled
While I agree with bigrigdriver, that most of the question can be found by a search on the internet. The whole point of this site is to help new people, and this question may be difficult to find exactly, so let me see if I can help.
The linux filesystem has a VERY different structure than windows. Once you get to know it, you will love it. It is much more organized and there is much less redundancy.
Let me give a quick analogy. You bought a house and decide it's time to get tools to work on your house. When it comes time to organize your tools you decide there are two ways you can do it. Make a bucket for every job, so every tool you need for one type of repair goes in a bucket. Convienient, but lot of redundancy, and sometimes you just need a friggin screwdriver!! This is analagous to windows. Linux on the other hand would be a methodically organized toolbox. Wrenches in one drawer, screwdrivers in another.

The root filesystem looks pretty similar on most linux systems. You may see more stuff, but the directories you are going to see off of the root directory for sure are these.

/home This is equivlent to c:\users\ in windows. All the users will have a directory within this directory. In your particular directory you may find a setup that looks similar to windows, such as a documents and pictures directory. However this is distro dependant.

/bin and /sbin
Like I tried to explain in my analogy above, linux doesn't mix file types. Every file in these directories is executable. There are other directories, not off of root like this as well such as /usr/bin. There is no good comparison to a windows directory since windows compartmentalizes it's programs. The closest example might be the c:\windows\system32 directory. Just remember that /bin directories usually contain files that everyone can execute, while /sbin directories are generally reserved for administrative programs.

/etc Back in the day, before Windows XP and the windows registry, config files were grouped with all the other files associated what that program. It was confusing, and the registry was considered a huge accomplishment. Of course the registry is an administrative nightmare, but they were trying. On linux, all the config files are kept in /etc

/var var stands for variable. Things that change a lot go here. Logs, mail, etc. On easy to use systems there is not a whole lot of need to mess with /var because services control most of the actions here.

/dev ok, here is where it gets a little confusing. Everything in linux is a file. /dev contains representations of every device on your system in the form of a file. Your system memory, /dev/mem. Your clock, /dev/rtc. Your first hard drive, /dev/sda. The first partition on your first hard drive /dev/sda1. Given enough time playing with linux, you'll figure out what to do with these.

/mnt and possibly /media When you insert a CD or jump drive into a windows machine, Windows automaticlly mounts it and assigns it a letter. Newer versions of linux do the same thing, only it's not a letter, but a directory, generally off of /media.
If you have a more simplistic linux system. or if you just prefer doing it manually, you can mount and unmount filesystems manually by specifying the device and the location you want to mount it. For example:
[code]
mount /dev/sdc1 /mnt
[\code]
This command would mount the first partition of the third drive at /mnt.

/sys sorta similar to /dev, but not really. Again it is actual devices however, rather than actual mountable block files it's more like volitile memory of devices (can someone explain this better?) You can do a lot of really cool things or totally f**k your system by playing in this directory.

/proc files that represent actual processes currently happening on your system. The best way to understand is to look at some for yourself. For example, check out /proc/cpuinfo

/lib Library files. equivlent to dll's in windows. Difficult to explain if you are not a programmer. If you want a better understanding read about "static and dynamic libraries" You may want to read about "includes" as well since you will see directories in linux dedicated to these as well.

/boot contains the kernel. (this you can google, I'm not explaining the kernel here)

/tmp This is a directory which everyone should have access to. It's reserved work space which is purged quite often.


/usr If you look around in /usr you find a filesystem with a lot of similar directories to the root directory. Such as /usr/bin, and possibly /usr/sbin. The idea is this. Core components of the system are installed off of the root directory. Programs like games, web browsers, office suites, are installed in /usr

/opt Everybody has a different opinion about this one. It stands for optional. I use it for programs which were slopily ported from windows to linux and don't follow the linux structure.
/root This is actually the home directory for the root user

There will be more directories on newer systems like /run which deals with services. but that should get you started for now

Last edited by mreff555; 06-19-2014 at 08:04 AM.
 
3 members found this post helpful.
Old 06-19-2014, 09:02 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Member Response

Hi,

Welcome to LQ!
Quote:
Originally Posted by 009jim View Post
Gents, I played with Ubuntu about 5 years ago and still use it intermittently as the OS on my spare PC when I am solving hardware problems on my main windows PC. Lately I have a new (2nd hand) PC that I am readying to replace my main PC. I'm liking the idea of using Zorin and permanently leaving windows. However, it's often said that "the linux file system is completely different to windows" This I found true when I used Ubuntu. I was confused when I tried to do something simple like locating a file and copying to a place where I knew I could find it. With windows, most things end up in "my documents" and you can have sub-folders like "my family photos" etc. I need to be able to do something logical like this with my linux OS. What I would like is a tutorial on the linux / unbuntu / zorin file system. Please help.
You can look at the links within: Linux File System
Hope this helps.
Have fun!
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Back up your system with Clonezilla – Tutorial LXer Syndicated Linux News 0 01-28-2013 04:21 PM
LXer: Tutorial: GRUB vs. the Inodes: Who Needs a Bootable System, Anyway? LXer Syndicated Linux News 2 08-07-2008 01:47 AM
Linux system calls tutorial john_crichton Programming 4 04-15-2007 02:53 PM
operating system concept tutorial? doublefailure Linux - General 0 10-06-2002 04:27 AM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration