Translate

Sunday 29 October 2017

Files & File System in Linux

Hello and welcome you to our video tutorial “Linux for Beginners”.

Today in this tutorial we will  be learning something about Files and File System in Linux.



Files in Linux

In Linux everything is a file, if something is not a file, it is a process.

There are some special files that are more than just files(named pipes and sockets etc), but to keep it simple, we can say that everything is a file.

Here normal files are files, directory's are files as they are
files with more files in them.

Programs, services, texts, images, and all others are files.
Even Input and output devices, and generally all devices are considered to be files.

File Types

Regular Files:
Images, videos, executable files, programs etc.
They contain normal data, for example text files, Most files are just files which are called regular files.

Directories :
These are files that are lists of other files.

Character devices  & Block devices :
Character and block device files allow users and programs to communicate with hardware peripheral devices.
Block devices are similar to character devices.
They mostly govern hardware as hard drives, memory.



Links:
Link are shortcuts as we create in windows, its an system to make a file or directory visible in multiple parts of the system.

Sockets:
Its an special file type, similar to TCP/IP sockets, we can see as an logical endpoint for communication.
We can send and receive things on a socket.

Named pipes:
Act more or less like sockets and form a way for processes to communicate with each other.

Disk Partition

There are two kinds of major partitions on a Linux system:
Data partition:
Normal Linux system data, including the root partition containing all the data to start up and run the system.

Swap partition:
Expansion of the computer's physical memory, extra
memory on hard disk.

File system Layout

In Linux,  files are in a tree structure which starts with the root directory. This root directory start the file system,  and  it further branches out various other subdirectories.

What directories actually contains ?



/bin
Common programs, shared by the system, the system administrator and the users.

/boot
The startup files and the kernel is present here.

/dev
Contains references to all the CPU peripheral hardware.

/etc
Most important system configuration files are in /etc, this directory contains data similar to those in the Control Panel in Windows

/home
Home directories of the common users.
 
/lib
Library files, includes files for all kinds of programs
needed by the system and the users.

/lost+found
Every partition has a lost+found in its upper directory. Files that were saved during failures are here.

/misc
For miscellaneous purposes.



/opt
Typically contains extra and third party software.

/root
The administrative user's home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/tmp
Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any work!

/usr
Programs, libraries, documentation etc. for all user-related programs.

/var
Storage for all variable files and temporary files
created by users, such as log files, the mail queue,
the print spooler area, space for temporary storage
of files downloaded from the Internet, or to keep an
image of a CD before burning it.



Thank you friends for reading the blog post on files and files system in Linux
Now we are very clear about them. 
Now let’s continue our journey and meet In the next tutorial.

Also check my YouTube channel for Audio Visual and tutorials on other topics also.


YouTube Channel   Facebook Group
Onion Secure YT   Onion Secure FB





No comments:

Post a Comment