SlideShare a Scribd company logo
1 of 22
Download to read offline
Basics of Linux
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.
Basic
Commands of
Linux
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
• After successful login, you will get shell prompt
• There are two privilege in user
• $ : user
• # : root
• Linux is case sensitive
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
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
File Permission
• 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)
File Permission (Cont)
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
• /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)
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.
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.
Step: 5
Step: 1 Step: 2 Step: 3
Step: 4 Step: 6
Step: 7 Step: 8 Step: 9
Step: 10 Step: 11 Step: 12
Step: 13 Step: 14 Step: 15
Step: 16 Step: 17 Step: 18
Step: 19 Step: 20 Step: 21
Step: 22 Step: 24
Step: 23
Step: 25 Step: 26 Step: 27
Step: 28 Step: 30
Step: 29
Step: 35
Step: 31 Step: 32 Step: 33
Step: 34 Step: 36
This is
how
Linux
Gnome
Desktop
Looks
• lokeshc@live.in
• Trainer – Information Technology
• Mobile:- +91-7996873793
Thank You!

More Related Content

Similar to Linux Basics

TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsShu-Yu Fu
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideErica StJohn
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-serviceRohit Sansiya
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystemsAcácio Oliveira
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
unit 3 ppt file represented system......
unit 3 ppt file represented system......unit 3 ppt file represented system......
unit 3 ppt file represented system......AnshJaiswal31
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Linux week 2
Linux week 2Linux week 2
Linux week 2Vinoth Sn
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)Papu Kumar
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 

Similar to Linux Basics (20)

TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
4. Centos Administration
4. Centos Administration4. Centos Administration
4. Centos Administration
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
Linux
Linux Linux
Linux
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
unit 3 ppt file represented system......
unit 3 ppt file represented system......unit 3 ppt file represented system......
unit 3 ppt file represented system......
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)
 
File000128
File000128File000128
File000128
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

Linux Basics

  • 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.
  • 15. Step: 5 Step: 1 Step: 2 Step: 3 Step: 4 Step: 6
  • 16. Step: 7 Step: 8 Step: 9 Step: 10 Step: 11 Step: 12
  • 17. Step: 13 Step: 14 Step: 15 Step: 16 Step: 17 Step: 18
  • 18. Step: 19 Step: 20 Step: 21 Step: 22 Step: 24 Step: 23
  • 19. Step: 25 Step: 26 Step: 27 Step: 28 Step: 30 Step: 29
  • 20. Step: 35 Step: 31 Step: 32 Step: 33 Step: 34 Step: 36
  • 22. • lokeshc@live.in • Trainer – Information Technology • Mobile:- +91-7996873793 Thank You!