2. It is Unix based Operating System developed by community.
Originated in 1991.
It is free open-source software (FOSS)
The defining component of Linux is the Linux kernel
Monolithic
Micro
The user interface, also known as the shell, is either a command-line
interface (CLI)
Sh – simple shell
BASH – Bourne Again Shell
KSH – Korne Shell
CSH – C Shell
SSH – Secure Shell
Text Editor: VI, Emacs, gEdit, kWrite, Pico, Nano etc.
4. Basic Commands
• Listing files in a directory
• ls – Lists all files in a directory
• ls –a – Lists all files (including hidden files)
• ls –l – Lists files in a directory along with owner information,
permission etc
• Terminal Emulator
• xterm – Generates a terminal
• xterm –fg color –bg color –rightbar : Generates a terminal with the
specified background and foreground color and a scroll bar on the
right side
5. • After successful login, you will get shell prompt
• There are two privilege in user
• $ : user
• # : root
• Linux is case sensitive
6. Basic Commands (cont)
• $ mkdir – for creating new directory
• $ rm – for removing file or directory
• $ mv – for moving file or directory
• $ chgrp – changing group
• $ unzip – unzipping a file
• $ cp – copying file or directory
• $ pwd - returns full path of the current directory
7. Basic Commands (cont)
• Help about commands
• man, pinfo, info (man <<cmd name>>)
• Viewing file’s content
• cat <<filename>>
• Viewing users, processes
• who – List all Users
• who am i – List the current user
• pstree – displays all processes running in the system in tree format
• ps – displays processes owned by the current user
• Changing file permission/owner
• chmod – changes file permission
• chown – changes file owner
9. • Octal numbers and permissions
• You can use octal number to represent mode/permission:
• r : 4
• w: 2
• x : 1
• 0+r+w+x = 0+4+2+1 = 7
• Only Read and write permission on a file in octal is 0+r+w+x = 0+4+2+0 = 6
• Only read and execute permission on a file in octal is 0+r+w+x = 0+4+0+1 = 5
• (Default) User = r+w+x = 0+4+2+1 = 7
• (Default) Group = r+w+x = 0+4+2+0 = 6
• (Default) Others = r+w+x = 0+0+0+1 = 1
File Permission (cont)
11. File system structure
• /boot
• Bootloader, bootloader config and kernel images
• /bin
• Binary files, basic utilities, required for boot
• /sbin
• System binary, system management tools
• /lib
• Shared libraries and kernel modules
• /etc
• System configuration, passwords, service config
• /home
• Home directory of users
12. • /root
• Home directory of root
• /var
• log files, message files, lock files, www root, ...
• /tmp
• temporary files, socket files, pipe files
• /usr
• Like the /, /usr/include additional directories bin, sbin,
• /opt
• Additional software's
• /proc
• Virtual file system, process and system information
• Kernel Interface in user space
File system structure (cont)
13. Filesystem Types
ext2 — An ext2 filesystem supports standard Unix file types (regular
files, directories, symbolic links, etc). It provides the ability to assign
long file names, up to 255 characters. Versions prior to Red Hat Linux
7.2 used ext2 filesystems by default.
ext3 — The ext3 filesystem is based on the ext2 filesystem and has one
main advantage — journaling. Using a journaling filesystem reduces
time spent recovering a filesystem after a crash as there is no need to
fsck the filesystem.
swap — Swap partitions are used to support virtual memory. In other
words, data is written to a swap partition when there is not enough
RAM to store the data your system is processing.
vfat — The VFAT filesystem is a Linux filesystem that is compatible
with Windows 95/NT long filenames on the FAT filesystem.
14. Recommended Partitioning Scheme
Unless you have a reason for doing otherwise, it is recommended that you
create the following partitions:
/boot partition – contains kernel images and grub configuration and
commands
/ partition
/ var partition
/ home partition
Any other partition based on application (e.g /usr/local for squid)
swap partition — swap partitions are used to support virtual memory. In
other words, data is written to a swap partition when there is not enough
RAM to store the data your system is processing. The size of your swap
partition should be equal to twice your computer's RAM.