Linux Basics - LinuxCraft

LinuxCraft

only search Linux Craft
Go to content

Main menu

Linux Basics

Manuals > Linux Basics

In short terms. What is Linux? Linux is a Unix-like operating system, but if we look details, Linux is a kernel of operating system. In order to kernel had any interaction with the enviroment, it is necessary to set up any external interface - shell. Generaly, we had 2 type of shell- textual (command line interface or shorten CLI) and graphical. Kernel + shell + applications, all together form entity that is often called Linux, but (if we look in detail) a more accurate name is Linux Distribution. There are many Linux Distributions, but some top are:  Ubuntu, Open SuSE, Fedora, PCLinuxOS, Debian, Mint, Gentoo, Slackware, ArchLinux... For more details, look on DistroWatch.

File System and partitioning

Most often question is : "What is necessary to installing Linux for first time?". You must have a free disk space. The best and easiest way is if the wohe hard disk drive is dedicated to Linux. Linux uses "its own file system" (FS) and most used are ext2, ext3, ext4 and RAISERFS. Can be used from other operating system, but best is they native fs. There is another FS, whitch is important for Linux - SWAP FS.
Dispate the fact that is not necessary for Linux SWAP partition, it is common practice to create separate partitions for SWAP. SWAP or Page file concept is known to all those who worked on Windows OS and marks one part of the Virtual memory stored on hard disk. Usually the size of SWAP is 1.5 to 2 times of RAM (physical memory), but to my personal experience, a reasonable upper limit for SWAP is 3G of RAM.
Next on what should pay attention is the term - Partition. If we look Windows, we have partition, which we recognize them by letter of the English alphabet. Linux, as Unix-like system, use completely different system of labeling.

It could be said to we have devices that ar attached to the Unix tree.  Tree is something that is typical for Unix-like systems and has a root of tree (labeling - / )  and his directories (tree). Each device gets its mountpoint - a place from where you can access it.

A typical example of Linux tree is:
/         - as root-base directory
/bin     - directory which includes commonly used binaries
/boot   - directory which includes files used to bootup operating system
/dev    -  would not be wrong to say that here is  "drivers" for recognized devices that are a connected to a Linux system
/etc     - configurations files
/home - space for user profiles and user data
/lib      - libraries common to most programs and drivers for Linux system
/media - place where mobile devices are usually connected (e.g. USB Flash, external HDD, mobile phone..)
/mnt    - similary media, but more often used for fixed media (e.g. partition on internal HDD)
/opt     - place for non-standard (optional) installations
/proc   - dynamic directories commonly used for runtime state information by usnig file-level system and commands
/root    - space for root (unix/linux super-user) account data and profile

/sbin    - should contain only binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin
/tmp    - place for temporary directories and files
/usr     - this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc...
/var     - contains variable data like system logging files, mail and printer spool directories, and transient and temporary files.


Devices that are mounted are recognized in the /dev directory. Eg.  When we have an SATA disk drive, he identifies as /dev/sda1 (s-sata, d-device/disk, a -first disk,1 - first partition). MBR (Master Boot Record) is located in the header of the disk and is denoted as /dev/sda0 . Devices that have no partitions (eg CD/DVD device) are labeled simply with no numbers (/dev/sdb).


Back to content | Back to main menu