LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-29-2016, 08:09 AM   #1
andul
LQ Newbie
 
Registered: Nov 2015
Distribution: Debian Wheezy
Posts: 20

Rep: Reputation: Disabled
Question about the filesystem


How do the folders like /bin, /boot, etc. work? Do they have some special properties, or are they the exact same as directories made with mkdir?
 
Old 04-29-2016, 08:30 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 18.3 MATE, MX-18.3
Posts: 2,462
Blog Entries: 10

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
http://www.thegeekstuff.com/2010/09/...tem-structure/
 
1 members found this post helpful.
Old 04-29-2016, 08:31 AM   #3
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Rep: Reputation: Disabled
Lightbulb

The directories like /bin, /boot, /etc are sub-directories of the / directory. With that being said, these directories are the same as any other directory within your file system in the sense that they could be made with the mkdir command (provided you had all the programs that came with your operating system to put in them.) What makes directories like /bin, /etc/, /boot, etc... special is what is inside the folders themselves. /bin contains mostly binary executables that are ready to run. For example ls is one of the executables in /bin. When you type ls your computer searches through a command path, finds /bin and when it sees ls it runs system calls like fork() and exec() that will run ls. /etc is an important customization directory. In /etc you will find all the configuration files (most of them anyway) for your system. /boot is the directory that holds things like the kernel loader files and things related to grub or LILO if you have that stuff. In general the Linux file system is a UNIX-based file system that is arranged in a hierachy structure with / being the directory that holds all other directories. Hence why / is called the "root" directory. /root is the directory for your superuser. If you want more information I would suggest getting the book "How Linux Works" by Brian ward and additionally getting any manuals that come with your particular Linux distribution
 
1 members found this post helpful.
Old 04-29-2016, 08:33 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,602

Rep: Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769
The link below explains what the purpose of the various directories and what they contain.

http://www.howtogeek.com/117435/htg-...ure-explained/
 
2 members found this post helpful.
Old 04-29-2016, 08:50 AM   #5
andul
LQ Newbie
 
Registered: Nov 2015
Distribution: Debian Wheezy
Posts: 20

Original Poster
Rep: Reputation: Disabled
I'm wondering, is it possible to create the filesystem from scratch? or is that really difficult to do?
 
Old 04-29-2016, 09:02 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Every system install has to create filesystem from scratch, not difficult, doable but tedious to do by hand (can make typo, forget some dirs)
Check linux from scratch subforums
 
1 members found this post helpful.
Old 04-29-2016, 10:37 AM   #7
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Rep: Reputation: Disabled
Lightbulb

The command mkfs for example: mkfs -t ext4 /dev/sdb1 will make a Linux file system of type ext4 on the block device sdb partition 1. It is totally possible to make a file system as there is a command to do so. If you want to get more in-depth as to make file systems, I suggest that in your spare time you read up on database/information theory and assembly languages.
 
1 members found this post helpful.
Old 04-30-2016, 08:03 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,842

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
Quote:
Originally Posted by andul View Post
I'm wondering, is it possible to create the filesystem from scratch? or is that really difficult to do?
As above, the answer is yes.

If you would like some details... Look at/read the LFS (Linux from Scratch) documentation at
http://www.linuxfromscratch.org/lfs/read.html

The specific section on creating directories is at
http://www.linuxfromscratch.org/lfs/...atingdirs.html

And shows the commands used.
 
1 members found this post helpful.
Old 04-30-2016, 04:51 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177
Be aware that there are some "filesystems" ... /proc, /sys ... which do not actually, physically, exist at all!

They are, in fact, API's to the kernel. When you ls them to "see what files and directories they contain," or when you read (or, if authorized ... write) to a "file" that you see, the kernel actually intercepts the request directly, and generates an appropriate response. These resources do not in fact correspond to any physical location on any storage device.

(P.S. It is the most downright slick, even elegant, operating-system API that I have ever seen. "Anyone and anything can use it," easily, using ordinary commands and interfaces.)

Last edited by sundialsvcs; 04-30-2016 at 04:53 PM.
 
  


Reply

Tags
directory, filesystem


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
A filesystem question 2007fld Linux - Newbie 5 08-18-2011 03:08 PM
filesystem question ygloo Linux - General 15 08-21-2006 03:47 PM
linux filesystem question SPo2 Linux - General 4 02-20-2006 04:52 AM
Filesystem Question Ryan450 Linux - Newbie 8 08-09-2005 01:19 AM
Filesystem question log Linux - General 5 06-13-2003 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:42 PM.

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