SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Linux Commands Revision
   Facebook group: Learn To Be
   Official website: www.L2b-egypt.org

   Prepared By: SHATRIX
   E-Mail: eng.shatrix@gmail.com



Learn To Be                              Embedded Linux Training
2


Linux History
  • Unix (Ken Thompson & Dennis Ritchie) AT&T company
  • FSF & GNU (Gnu is Not Unix) & GPL (Richard Stallman)
    1984
      ▫ Hurd Kernel
  • Minix (Andrew Tanenbaum)
  • Linux (Linus Torvalds) 1991
  • GNU/Linux (complete, open source, UNIX-like
    operating system)
  • Open source: software and source code available to all
      ▫ The freedom to distribute software and source code
      ▫ The ability to modify and create derived works
      ▫ Integrity of author's code

Learn To Be                                       Embedded Linux Training
3


Linux Structure
  •   BootLoader (grub, uboot, vivi)
  •   Kernel (www.kernel.org)
  •   Filesystem (FHS)
  •   shell (bash & ash & sh)
  •   init process
  •   Scripts & Environment variables
  •   Applications
  •   GUIs & TUI




Learn To Be                             Embedded Linux Training
4


Linux principles
  • Everything is a file (including hardware)
  • Small, single-purpose programs
  • Ability to chain programs together to perform complex
    tasks
  • Avoid user interfaces
  • Configuration data stored in text




Learn To Be                                  Embedded Linux Training
5


Linux View
  • Gnome & Kde (X Window system)
  • root & users
  • Common applications
      ▫ gedit, open office, totem, nautilus
  •   Internet
  •   Terminal
  •   Virtual console
  •   file types
      ▫ normal (text, audio, document)
      ▫ directory
      ▫ special (node, pipe, link (symbolic & hard))
Learn To Be                                            Embedded Linux Training
6


Filesystem Hierarchy Standard
  •   /             root directory
  •   /bin          commands & executable files
  •   /sbin          system commands & executable files
  •   /boot          kernel & bootloader
  •   /dev           hardware device files (nodes)
  •   /etc          configuration files and startup scripts
  •   /home         users' home directories
  •   /root         root home directory
  •   /lib          shared library files
  •   /media        mount points for storage media
  •   /opt          third parity applications
  •   /proc         virtual process files
  •   /usr          other users applications & libraries
  •   /var          files that change a lot
Learn To Be                                 Embedded Linux Training
7


Commands & help
  •   command [option(s)] [parameter(s)]
  •   man
  •   info
  •   --help
  •   sudo




Learn To Be                                Embedded Linux Training
8


Common commands
  •   cd               change directory
  •   pwd              print current working directory
  •   ls               list files in current directory
  •   cp               copy
  •   mv               move & rename
  •   touch            create a new file
  •   mkdir            create a directory
  •   rm               remove files
  •   file             file type
  •   cat              print file contents
  •   less             view file contents in pages
  •   passwd           change user's password
  •   Absolute and Relative Pathnames
Learn To Be                                        Embedded Linux Training
9


Text tools
  • nano
  • vim
      ▫ modes
      ▫ keyboard shortcuts
  • gedit




Learn To Be                  Embedded Linux Training
10


Permissions
  • ls -l
  - | --- | --- | ---
  - | rwx | rwx | rwx
  t | own | grp | other
  • chmod
      ▫ letter mode
      ▫ numeric mode
  • Users & Groups
      ▫ chown
      ▫ chgrp
Learn To Be               Embedded Linux Training
11


Programs Packages (debian)
  • apt-get
      ▫ install update remove
  • dpkg
      ▫ Binary packages
  • Source packages
      ▫ ./configure [options]
      ▫ make
      ▫ make install




Learn To Be                     Embedded Linux Training
12


man
  • man sections         1      5    8
  • Display manual page descriptions
      ▫ man      -f           command
      ▫ whatis        what?
  • Search the manual page names and descriptions
      ▫ man     -k          pattern
      ▫ apropos       pattern




Learn To Be                                 Embedded Linux Training
13


System information commands
  •   whoami                 print effective user
  •   hostname               show or set the system's host name
  •   date                   print or set the system date and time
  •   cal                    displays a calendar and the date of Easter
      ▫ cal [[month] year]
  • uptime                   Tell how long the system has been running
  • w                        Show who is logged on and what they are
    doing
  • finger                   user information lookup program
      ▫ finger user-name
  • uname                    print system information
      ▫ uname -a
  • free                     Display amount of free and used memory
  • df                       report file system disk space usage
  • du                       estimate file space usage
      ▫ du -sh file-or-folder-name
Learn To Be                                                 Embedded Linux Training
14


Pipe & Redirection
  • cat file-name | less
  • Standard output
      ▫ command > file
  • Standard error
      ▫ command 2> file
  • The Black hole
      ▫ /dev/null




Learn To Be                Embedded Linux Training
15


File Search tools
  • whereis            locate the location for a command
      ▫ whereis        command
      ▫ whereis        -b           command
  • locate             find files by name
      ▫ locate   file-name
      ▫ updatedb             update a database for mlocate
  • find               search for files in a directory hierarchy
      ▫ find      path-to-search-in -name search-word




Learn To Be                                        Embedded Linux Training
16


Text files search tools
  • grep               print lines matching a pattern
      ▫ grep search-pattern file-name
      ▫ grep -v
      ▫ cat file-name | grep pattern
  • cut                remove sections from each line of files
      ▫ cut -d”delimiter” -f”field” file-name
      ▫ cut -d: -f1 /etc/passwd
  • Print the shell for a user
      ▫ grep root /etc/passwd | cut -d: -f7



Learn To Be                                      Embedded Linux Training
17


Process Management
  • ps          report a snapshot of the current processes
      ▫ ps      axu
      ▫ ps      axo
  • top         display Linux tasks
  • pidof       find the process ID of a running program
  • kill        send a signal to a process
      ▫ kill pid
      ▫ kill -s signal-number pid
  • killall           kill processes by name
      ▫ killall process-name


Learn To Be                                     Embedded Linux Training
18


Archiving
  • tar         The GNU version of the tar archiving utility
      ▫   tar   cf     myfile.tar    myfolder
      ▫   tar   xvf    myfile.tar
      ▫   tar   xvf    myfile.tar.bz2
      ▫   tar   xvfz   myfile.tar.gz




Learn To Be                                      Embedded Linux Training
Thank You
   Facebook group: Learn To Be
   Official website: www.L2b-egypt.org

   Prepared By: SHATRIX
   E-Mail: eng.shatrix@gmail.com



Learn To Be                              Embedded Linux Training

More Related Content

What's hot (20)

PPTX
Introduction to linux at Introductory Bioinformatics Workshop
Setor Amuzu
 
PDF
Memory management in Linux kernel
Vadim Nikitin
 
PPTX
Linux Kernel Tour
samrat das
 
PDF
LCU14 500 ARM Trusted Firmware
Linaro
 
PDF
Linux Memory Management
Anil Kumar Pugalia
 
PDF
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
Linaro
 
PDF
IBM MQ Clustering (2017 version)
MarkTaylorIBM
 
PPTX
Kernel | Operating System
Sumit Pandey
 
PPTX
Cache memory
Ganesh Rocky
 
PPTX
Linux Memory Management
Suvendu Kumar Dash
 
PDF
Scheduling in Android
Opersys inc.
 
PDF
High Performance Computing using MPI
Ankit Mahato
 
PPTX
Semaphore
sangrampatil81
 
PPTX
Swapping | Computer Science
Transweb Global Inc
 
PDF
Making Linux do Hard Real-time
National Cheng Kung University
 
PPT
OS Structure
Ajay Singh Rana
 
PDF
Aca2 10 11
Sumit Mittu
 
PPTX
Windows process scheduling presentation
Talha Shaikh
 
Introduction to linux at Introductory Bioinformatics Workshop
Setor Amuzu
 
Memory management in Linux kernel
Vadim Nikitin
 
Linux Kernel Tour
samrat das
 
LCU14 500 ARM Trusted Firmware
Linaro
 
Linux Memory Management
Anil Kumar Pugalia
 
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
Linaro
 
IBM MQ Clustering (2017 version)
MarkTaylorIBM
 
Kernel | Operating System
Sumit Pandey
 
Cache memory
Ganesh Rocky
 
Linux Memory Management
Suvendu Kumar Dash
 
Scheduling in Android
Opersys inc.
 
High Performance Computing using MPI
Ankit Mahato
 
Semaphore
sangrampatil81
 
Swapping | Computer Science
Transweb Global Inc
 
Making Linux do Hard Real-time
National Cheng Kung University
 
OS Structure
Ajay Singh Rana
 
Aca2 10 11
Sumit Mittu
 
Windows process scheduling presentation
Talha Shaikh
 

Viewers also liked (20)

PDF
003 scripting
Sherif Mousa
 
PDF
Building Embedded Linux Systems Introduction
Sherif Mousa
 
PPT
Building Embedded Linux
Sherif Mousa
 
PDF
Operating systems Basics
Sherif Mousa
 
PDF
Yocto - Embedded Linux Distribution Maker
Sherif Mousa
 
PDF
005 skyeye
Sherif Mousa
 
PPT
linux minimal os tutorial - by shatrix
Sherif Mousa
 
PDF
Embedded Linux from Scratch to Yocto
Sherif Mousa
 
PDF
كيف تفشل
Sherif Mousa
 
PDF
Chapter 24- Seeds & Flowers
Mary Beth Smith
 
PPT
Chapter 2 - Matter and Change
Kendon Smith
 
ODP
Web Application Lunacy
anandvaidya
 
PDF
Chapter One- Intro to Biology
Mary Beth Smith
 
PDF
Chapter 1 Lecture- Matter & Measurement
Mary Beth Smith
 
PPT
Introduction to xml
Shivalik college of engineering
 
DOC
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
hjk888
 
PPTX
Operating system ppt
kaviya kumaresan
 
PPT
Chapter 4 Lecture- Solution Stoich
Mary Beth Smith
 
PPT
UNIX(Essential needs of administration)
Papu Kumar
 
PPT
Chapter 5 - Electron Configurations
Kendon Smith
 
003 scripting
Sherif Mousa
 
Building Embedded Linux Systems Introduction
Sherif Mousa
 
Building Embedded Linux
Sherif Mousa
 
Operating systems Basics
Sherif Mousa
 
Yocto - Embedded Linux Distribution Maker
Sherif Mousa
 
005 skyeye
Sherif Mousa
 
linux minimal os tutorial - by shatrix
Sherif Mousa
 
Embedded Linux from Scratch to Yocto
Sherif Mousa
 
كيف تفشل
Sherif Mousa
 
Chapter 24- Seeds & Flowers
Mary Beth Smith
 
Chapter 2 - Matter and Change
Kendon Smith
 
Web Application Lunacy
anandvaidya
 
Chapter One- Intro to Biology
Mary Beth Smith
 
Chapter 1 Lecture- Matter & Measurement
Mary Beth Smith
 
Introduction to xml
Shivalik college of engineering
 
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
hjk888
 
Operating system ppt
kaviya kumaresan
 
Chapter 4 Lecture- Solution Stoich
Mary Beth Smith
 
UNIX(Essential needs of administration)
Papu Kumar
 
Chapter 5 - Electron Configurations
Kendon Smith
 
Ad

Similar to 001 linux revision (20)

PDF
Linux: A Getting Started Presentation
Nap Ramirez
 
PPTX
Presentation for RHCE in linux
Kuldeep Tiwari
 
PDF
Commands
damlepramod
 
PDF
Basic linux commands
Akkamahadevi Gowda
 
PDF
Basic commands
ambilivava
 
PDF
Linux system administration
orionsconsulting
 
PPT
Learning Linux v2.1
sdiviney
 
PDF
beginner.en.print
Aniruddh Tyagi
 
PDF
beginner.en.print
aniruddh Tyagi
 
PDF
beginner.en.print
aniruddh Tyagi
 
PPTX
Rishav Mishra final presentation on UNIX Final.pptx
rishavmishra041
 
PPTX
Introduction to linux day1
UtpalenduChakrobortt1
 
PPT
Ch1 linux basics
chandranath06
 
PDF
Programming Embedded linux
Liran Ben Haim
 
PPT
Linux Administration
harirxg
 
PPT
Linux Administration
Harish1983
 
PPTX
Linux administration training
iman darabi
 
PDF
Linux for Beginners
Gobinath Loganathan
 
PDF
Information about linux operating system
PriyankaMate4
 
PDF
Quick guide of the most common linux commands
Carlos Enrique
 
Linux: A Getting Started Presentation
Nap Ramirez
 
Presentation for RHCE in linux
Kuldeep Tiwari
 
Commands
damlepramod
 
Basic linux commands
Akkamahadevi Gowda
 
Basic commands
ambilivava
 
Linux system administration
orionsconsulting
 
Learning Linux v2.1
sdiviney
 
beginner.en.print
Aniruddh Tyagi
 
beginner.en.print
aniruddh Tyagi
 
beginner.en.print
aniruddh Tyagi
 
Rishav Mishra final presentation on UNIX Final.pptx
rishavmishra041
 
Introduction to linux day1
UtpalenduChakrobortt1
 
Ch1 linux basics
chandranath06
 
Programming Embedded linux
Liran Ben Haim
 
Linux Administration
harirxg
 
Linux Administration
Harish1983
 
Linux administration training
iman darabi
 
Linux for Beginners
Gobinath Loganathan
 
Information about linux operating system
PriyankaMate4
 
Quick guide of the most common linux commands
Carlos Enrique
 
Ad

Recently uploaded (20)

PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 

001 linux revision

  • 1. Linux Commands Revision Facebook group: Learn To Be Official website: www.L2b-egypt.org Prepared By: SHATRIX E-Mail: [email protected] Learn To Be Embedded Linux Training
  • 2. 2 Linux History • Unix (Ken Thompson & Dennis Ritchie) AT&T company • FSF & GNU (Gnu is Not Unix) & GPL (Richard Stallman) 1984 ▫ Hurd Kernel • Minix (Andrew Tanenbaum) • Linux (Linus Torvalds) 1991 • GNU/Linux (complete, open source, UNIX-like operating system) • Open source: software and source code available to all ▫ The freedom to distribute software and source code ▫ The ability to modify and create derived works ▫ Integrity of author's code Learn To Be Embedded Linux Training
  • 3. 3 Linux Structure • BootLoader (grub, uboot, vivi) • Kernel (www.kernel.org) • Filesystem (FHS) • shell (bash & ash & sh) • init process • Scripts & Environment variables • Applications • GUIs & TUI Learn To Be Embedded Linux Training
  • 4. 4 Linux principles • Everything is a file (including hardware) • Small, single-purpose programs • Ability to chain programs together to perform complex tasks • Avoid user interfaces • Configuration data stored in text Learn To Be Embedded Linux Training
  • 5. 5 Linux View • Gnome & Kde (X Window system) • root & users • Common applications ▫ gedit, open office, totem, nautilus • Internet • Terminal • Virtual console • file types ▫ normal (text, audio, document) ▫ directory ▫ special (node, pipe, link (symbolic & hard)) Learn To Be Embedded Linux Training
  • 6. 6 Filesystem Hierarchy Standard • / root directory • /bin commands & executable files • /sbin system commands & executable files • /boot kernel & bootloader • /dev hardware device files (nodes) • /etc configuration files and startup scripts • /home users' home directories • /root root home directory • /lib shared library files • /media mount points for storage media • /opt third parity applications • /proc virtual process files • /usr other users applications & libraries • /var files that change a lot Learn To Be Embedded Linux Training
  • 7. 7 Commands & help • command [option(s)] [parameter(s)] • man • info • --help • sudo Learn To Be Embedded Linux Training
  • 8. 8 Common commands • cd change directory • pwd print current working directory • ls list files in current directory • cp copy • mv move & rename • touch create a new file • mkdir create a directory • rm remove files • file file type • cat print file contents • less view file contents in pages • passwd change user's password • Absolute and Relative Pathnames Learn To Be Embedded Linux Training
  • 9. 9 Text tools • nano • vim ▫ modes ▫ keyboard shortcuts • gedit Learn To Be Embedded Linux Training
  • 10. 10 Permissions • ls -l - | --- | --- | --- - | rwx | rwx | rwx t | own | grp | other • chmod ▫ letter mode ▫ numeric mode • Users & Groups ▫ chown ▫ chgrp Learn To Be Embedded Linux Training
  • 11. 11 Programs Packages (debian) • apt-get ▫ install update remove • dpkg ▫ Binary packages • Source packages ▫ ./configure [options] ▫ make ▫ make install Learn To Be Embedded Linux Training
  • 12. 12 man • man sections 1 5 8 • Display manual page descriptions ▫ man -f command ▫ whatis what? • Search the manual page names and descriptions ▫ man -k pattern ▫ apropos pattern Learn To Be Embedded Linux Training
  • 13. 13 System information commands • whoami print effective user • hostname show or set the system's host name • date print or set the system date and time • cal displays a calendar and the date of Easter ▫ cal [[month] year] • uptime Tell how long the system has been running • w Show who is logged on and what they are doing • finger user information lookup program ▫ finger user-name • uname print system information ▫ uname -a • free Display amount of free and used memory • df report file system disk space usage • du estimate file space usage ▫ du -sh file-or-folder-name Learn To Be Embedded Linux Training
  • 14. 14 Pipe & Redirection • cat file-name | less • Standard output ▫ command > file • Standard error ▫ command 2> file • The Black hole ▫ /dev/null Learn To Be Embedded Linux Training
  • 15. 15 File Search tools • whereis locate the location for a command ▫ whereis command ▫ whereis -b command • locate find files by name ▫ locate file-name ▫ updatedb update a database for mlocate • find search for files in a directory hierarchy ▫ find path-to-search-in -name search-word Learn To Be Embedded Linux Training
  • 16. 16 Text files search tools • grep print lines matching a pattern ▫ grep search-pattern file-name ▫ grep -v ▫ cat file-name | grep pattern • cut remove sections from each line of files ▫ cut -d”delimiter” -f”field” file-name ▫ cut -d: -f1 /etc/passwd • Print the shell for a user ▫ grep root /etc/passwd | cut -d: -f7 Learn To Be Embedded Linux Training
  • 17. 17 Process Management • ps report a snapshot of the current processes ▫ ps axu ▫ ps axo • top display Linux tasks • pidof find the process ID of a running program • kill send a signal to a process ▫ kill pid ▫ kill -s signal-number pid • killall kill processes by name ▫ killall process-name Learn To Be Embedded Linux Training
  • 18. 18 Archiving • tar The GNU version of the tar archiving utility ▫ tar cf myfile.tar myfolder ▫ tar xvf myfile.tar ▫ tar xvf myfile.tar.bz2 ▫ tar xvfz myfile.tar.gz Learn To Be Embedded Linux Training
  • 19. Thank You Facebook group: Learn To Be Official website: www.L2b-egypt.org Prepared By: SHATRIX E-Mail: [email protected] Learn To Be Embedded Linux Training