SlideShare una empresa de Scribd logo
1 de 19
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

Más contenido relacionado

La actualidad más candente

Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
艾鍗科技
 

La actualidad más candente (20)

systemd
systemdsystemd
systemd
 
CMake - Introduction and best practices
CMake - Introduction and best practicesCMake - Introduction and best practices
CMake - Introduction and best practices
 
Device tree
Device treeDevice tree
Device tree
 
Linux Internals - Interview essentials 4.0
Linux Internals - Interview essentials 4.0Linux Internals - Interview essentials 4.0
Linux Internals - Interview essentials 4.0
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module Programming
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Linux女子部 iptables復習編
Linux女子部 iptables復習編Linux女子部 iptables復習編
Linux女子部 iptables復習編
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Breaking Down the Entry Barriers on Linux Kernel Networking Stack
Breaking Down the Entry Barriers on Linux Kernel Networking StackBreaking Down the Entry Barriers on Linux Kernel Networking Stack
Breaking Down the Entry Barriers on Linux Kernel Networking Stack
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
 
NEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdfNEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdf
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
Linux Namespaces
Linux NamespacesLinux Namespaces
Linux Namespaces
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion
 
Linux commands
Linux commandsLinux commands
Linux commands
 

Destacado

Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
Sherif Mousa
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
Sherif Mousa
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
Sherif Mousa
 
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
2010 05 02 10 Dr Daniel C Tsui  Physics Nobel Prize King Carl Xvi Gustaf Of S...2010 05 02 10 Dr Daniel C Tsui  Physics Nobel Prize King Carl Xvi Gustaf Of S...
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
hjk888
 

Destacado (20)

003 scripting
003 scripting003 scripting
003 scripting
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
 
Operating systems Basics
Operating systems BasicsOperating systems Basics
Operating systems Basics
 
Yocto - Embedded Linux Distribution Maker
Yocto - Embedded Linux Distribution MakerYocto - Embedded Linux Distribution Maker
Yocto - Embedded Linux Distribution Maker
 
005 skyeye
005 skyeye005 skyeye
005 skyeye
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
كيف تفشل
كيف تفشلكيف تفشل
كيف تفشل
 
Chapter 24- Seeds & Flowers
Chapter 24- Seeds & FlowersChapter 24- Seeds & Flowers
Chapter 24- Seeds & Flowers
 
Chapter 2 - Matter and Change
Chapter 2 - Matter and ChangeChapter 2 - Matter and Change
Chapter 2 - Matter and Change
 
Web Application Lunacy
Web Application LunacyWeb Application Lunacy
Web Application Lunacy
 
Chapter One- Intro to Biology
Chapter One- Intro to BiologyChapter One- Intro to Biology
Chapter One- Intro to Biology
 
Chapter 1 Lecture- Matter & Measurement
Chapter 1 Lecture- Matter & MeasurementChapter 1 Lecture- Matter & Measurement
Chapter 1 Lecture- Matter & Measurement
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
2010 05 02 10 Dr Daniel C Tsui  Physics Nobel Prize King Carl Xvi Gustaf Of S...2010 05 02 10 Dr Daniel C Tsui  Physics Nobel Prize King Carl Xvi Gustaf Of S...
2010 05 02 10 Dr Daniel C Tsui Physics Nobel Prize King Carl Xvi Gustaf Of S...
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
 
Chapter 4 Lecture- Solution Stoich
Chapter 4 Lecture- Solution StoichChapter 4 Lecture- Solution Stoich
Chapter 4 Lecture- Solution Stoich
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)
 
Chapter 5 - Electron Configurations
Chapter 5 - Electron ConfigurationsChapter 5 - Electron Configurations
Chapter 5 - Electron Configurations
 

Similar a 001 linux revision

Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
Kuldeep Tiwari
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
Chander Pandey
 
Hpux graduate enginnering trainning
Hpux graduate enginnering trainningHpux graduate enginnering trainning
Hpux graduate enginnering trainning
Radhe Garg
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
QUONTRASOLUTIONS
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 

Similar a 001 linux revision (20)

The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
3. introduction of centos
3. introduction of centos3. introduction of centos
3. introduction of centos
 
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.comComandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Linux CLI
Linux CLILinux CLI
Linux CLI
 
Hpux graduate enginnering trainning
Hpux graduate enginnering trainningHpux graduate enginnering trainning
Hpux graduate enginnering trainning
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Linux: Basics OF Linux
Linux: Basics OF LinuxLinux: Basics OF Linux
Linux: Basics OF Linux
 
Linux system administration
Linux system administrationLinux system administration
Linux system administration
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdf00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdf
 
05. Ubuntu Terminal Commands.pptx
05. Ubuntu Terminal Commands.pptx05. Ubuntu Terminal Commands.pptx
05. Ubuntu Terminal Commands.pptx
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
File system discovery
File system discovery File system discovery
File system discovery
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 

001 linux revision

  • 1. 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. 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: eng.shatrix@gmail.com Learn To Be Embedded Linux Training