SlideShare a Scribd company logo
1 of 18
Download to read offline
Linux System Fundamentals
Lesson 1: Installation & Basics
Sadia Bashir
Contents
 Setting up Ubuntu 16.04 LTS Server/Desktop in a virtual machine
 What is Kernel?
 What is CLI?
 What is root (superuser)?
 Understanding and using “sudo”
 Understanding and using basic commands
 What is Linux Home Directory?
 Using auto-complete feature
 What are man pages?
Setting up Ubuntu 16.04 LTS Server/Desktop in a virtual
machine
 Installing Oracle VirtualBox
 Setting up Ubuntu Server 16.04 LTS Server/Desktop in a virtual
machine
 Installing putty
 Log into a Linux server and run simple updates and upgradation
What is Kernel?
 It is the core of a computer operating system that provides basic
services for all other parts of the operating system.
What is command-line?
 Command-line interface - CLI : tool which is used to type
text commands to perform specific tasks
 Shell : The application or user interface that accepts user’s
typed responses and displays the data on the screen
What is root (superuser)?
 A special user account used for system administration - has control over the entire
Linux system
 the user with a user identifier (UID) of zero
 the only user account with permission to modify the root directory of a Unix system
 It is capable of doing what normal users can’t, such as, changing ownership of files,
adding or removing files from system directories, installing new packages and many
others.
 “/” or “root” directory is different from “root” user.
Understanding and using “sudo” (super user do)
 sudo is a program for Unix-like computer operating systems that allow users to
run programs with the security privileges of another user, by default the
superuser.
 It prompts for personal password and confirms given request to execute a
command by checking a file, called sudoers, which the system administrator
configures.
 Usage:
- sudo su
- su -
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get update &sudo apt-get upgrade
Switch to “root” user
Use “sudo” to install packages
Understanding and using “sudo” (contd…)
Understanding and using basic commands
 What is Linux Home directory?
 Check present working directory - pwd
 Switch directories - cd
 View directory contents - ls
 View file contents - cat
 List logged-in users:
- users
- who
- whoami
- last
 Check ubuntu server version - lsb_release
 Search for files – locate
 Clear the terminal – clear
 Show command history - history
 Using auto-complete feature
 What are man pages?
What is Linux Home Directory?
 Linux is a multi-user operating system, which means that more than
one users can access the OS at the same time. Each user is assigned a
directory where he/she can store their personal files. This directory is
known as a user's home directory.
 Each user has complete control over his home directory as well as all
its sub-directories. He/She can freely perform operations like:
-create and delete files/directories
-install programs, and more, inside their home directory
 a user’s home directory has the same name as their login name.
 home directories are found under the home directory (/home).
Checking Present Working Directory (pwd)
 Whenever a user opens up a command line shell in Linux, it starts at
the user’s home directory by default. This is user’s present working
directory, which changes when he switches to some other directory.
 pwd command is used to check the complete path of user’s present
working directory at any point of time.
Switch directories (cd)
 command to navigate through the Linux filesystem
 this command requires either a directory name or its complete path
depending upon where the directory is present
 Usage:
-cd /path/to/ or
-cd directory_name
-cd ..
-cd -
-cd ~
-cd /
Switch immediately to home directory regardless of what present working directory is.
Switch back and forth between directories (toggling)
Switch to parent directory (single dot represents current directory)
Switch to root directory
View directory contents – ls
 lists the contents of a directory.
 the output of the ls command is color coded.
 different colors represent different types of files, making it easy to visually
identify them.
 Color codes:
- Blue (Directories),
- White (Text files),
- Red (Archives),
- Cyan (Links),
- Green (Executables),
- Pink (Images),
- Yellow (Device Files)
View directory contents – ls (contd…)
 Usage
-ls directoryName/directoryPath
-Options:
 -l : detailed listing
 -a : show hidden files
 -t : sort list based on timestamp
 -S : sort list by file size
 -r : reverse the sorting
 -d : list directories only, not their contents
 -h : print human readable sizes (e.g., 1K 234M 2G)
 use combination : -lShrt
View File Contents - cat
 Prints out file’s contents on standard output
 Command:
 cat FILE1.txt
 cat FILE1.txt FILE2.txt
 cat FILE1.txt - FILE2.txt : Output FILE1's contents, take input from user, and
then output FILE2's contents
 Options:
 -E : display $ at end of each line
 -n : number all output lines
List logged-in users
 Commands to check the complete list of logged in users either
current or all those attempts which have been made to connect user’s
machine by any user and the status of connection
 Users : prints user names of currently logged in users
 Last –a : displays a list of all users logged in (and out) since the OS is installed
 Who : shows currently logged in users with time details
 Whoami : prints the user name associated with the current effective user ID
Show command history – (history)
 history command shows a
list of all the recently used
commands
 up/down arrows are used
to loop through them
 The Ctrl+R shortcut key
will start a search mode
where the first few
characters of a command
are typed to search
through recent history
Using auto-complete feature
 tab key is used to auto complete long names and paths easily
 In case of similar initial names, shell displays all the names that it can
use for auto completion
What are man pages?
 To learn more about
Linux commands, users
can head over to the
respective man (or
Manual) pages that
come preinstalled with
Linux.
 To open a man page,
man command
followed by the
command name is run.

More Related Content

What's hot

What's hot (20)

A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Linux
Linux Linux
Linux
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Linux basic commands tutorial
Linux basic commands tutorialLinux basic commands tutorial
Linux basic commands tutorial
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
 
Linux basic
Linux basicLinux basic
Linux basic
 
Linux commands
Linux commandsLinux commands
Linux commands
 

Viewers also liked

Proteínas reguladoras del sistema de complemento
Proteínas reguladoras del sistema de complementoProteínas reguladoras del sistema de complemento
Proteínas reguladoras del sistema de complementoJoel Rivera Gaytán
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemSadia Bashir
 
Karakteristikat e familje pishore
Karakteristikat e familje pishoreKarakteristikat e familje pishore
Karakteristikat e familje pishoreArdian Kryeziu
 
Análisis de un artefacto tecnológico
Análisis de un artefacto tecnológicoAnálisis de un artefacto tecnológico
Análisis de un artefacto tecnológicogabriela rosero
 
Aprendamos los numeros del 1 al 5
Aprendamos los numeros del 1 al 5Aprendamos los numeros del 1 al 5
Aprendamos los numeros del 1 al 5eliestelicte
 
20170223 beaphar slo seminar
20170223 beaphar slo seminar20170223 beaphar slo seminar
20170223 beaphar slo seminarFrantišek Polda
 
Motilidad intestinal y control nervioso de la función
Motilidad intestinal y control nervioso de la funciónMotilidad intestinal y control nervioso de la función
Motilidad intestinal y control nervioso de la funciónJoel Rivera Gaytán
 
SafeTime® - "21st Century Scaffolding Inspections"
SafeTime® - "21st Century Scaffolding Inspections"SafeTime® - "21st Century Scaffolding Inspections"
SafeTime® - "21st Century Scaffolding Inspections"Aaron Dawson
 
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...AdStage
 
a successful man of the world
a successful man of the worlda successful man of the world
a successful man of the worldAgha A
 
Geo am prezzie
Geo am prezzieGeo am prezzie
Geo am prezzieTodd Barr
 
Manual maestro constructor
Manual maestro constructorManual maestro constructor
Manual maestro constructorYoel Mamani
 

Viewers also liked (20)

Proteínas reguladoras del sistema de complemento
Proteínas reguladoras del sistema de complementoProteínas reguladoras del sistema de complemento
Proteínas reguladoras del sistema de complemento
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Karakteristikat e familje pishore
Karakteristikat e familje pishoreKarakteristikat e familje pishore
Karakteristikat e familje pishore
 
Análisis de un artefacto tecnológico
Análisis de un artefacto tecnológicoAnálisis de un artefacto tecnológico
Análisis de un artefacto tecnológico
 
Aprendamos los numeros del 1 al 5
Aprendamos los numeros del 1 al 5Aprendamos los numeros del 1 al 5
Aprendamos los numeros del 1 al 5
 
20170223 beaphar slo seminar
20170223 beaphar slo seminar20170223 beaphar slo seminar
20170223 beaphar slo seminar
 
Little cookies
Little cookiesLittle cookies
Little cookies
 
Motilidad intestinal y control nervioso de la función
Motilidad intestinal y control nervioso de la funciónMotilidad intestinal y control nervioso de la función
Motilidad intestinal y control nervioso de la función
 
1843
18431843
1843
 
¿Qué es blarlo?
¿Qué es blarlo?¿Qué es blarlo?
¿Qué es blarlo?
 
SafeTime® - "21st Century Scaffolding Inspections"
SafeTime® - "21st Century Scaffolding Inspections"SafeTime® - "21st Century Scaffolding Inspections"
SafeTime® - "21st Century Scaffolding Inspections"
 
Prefabrication
PrefabricationPrefabrication
Prefabrication
 
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...
How to Reach Ideal Customers Using Search & Social Tactics - SMX West 2017 - ...
 
a successful man of the world
a successful man of the worlda successful man of the world
a successful man of the world
 
Geo am prezzie
Geo am prezzieGeo am prezzie
Geo am prezzie
 
Linux Fundamental
Linux FundamentalLinux Fundamental
Linux Fundamental
 
Indústria Vinícola Perfinox
Indústria Vinícola PerfinoxIndústria Vinícola Perfinox
Indústria Vinícola Perfinox
 
Indústria Alimentar Perfinox
Indústria Alimentar PerfinoxIndústria Alimentar Perfinox
Indústria Alimentar Perfinox
 
Manual maestro constructor
Manual maestro constructorManual maestro constructor
Manual maestro constructor
 
Acne y lepra
Acne y lepraAcne y lepra
Acne y lepra
 

Similar to Lesson 1 Linux System Fundamentals

Similar to Lesson 1 Linux System Fundamentals (20)

Linux Notes-1.pdf
Linux Notes-1.pdfLinux Notes-1.pdf
Linux Notes-1.pdf
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
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
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools
 
cisco
ciscocisco
cisco
 
3. intro
3. intro3. intro
3. intro
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
User administration concepts and mechanisms
User administration concepts and mechanismsUser administration concepts and mechanisms
User administration concepts and mechanisms
 
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
 
Linux
LinuxLinux
Linux
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Linux
LinuxLinux
Linux
 

Recently uploaded

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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 

Lesson 1 Linux System Fundamentals

  • 1. Linux System Fundamentals Lesson 1: Installation & Basics Sadia Bashir
  • 2. Contents  Setting up Ubuntu 16.04 LTS Server/Desktop in a virtual machine  What is Kernel?  What is CLI?  What is root (superuser)?  Understanding and using “sudo”  Understanding and using basic commands  What is Linux Home Directory?  Using auto-complete feature  What are man pages?
  • 3. Setting up Ubuntu 16.04 LTS Server/Desktop in a virtual machine  Installing Oracle VirtualBox  Setting up Ubuntu Server 16.04 LTS Server/Desktop in a virtual machine  Installing putty  Log into a Linux server and run simple updates and upgradation
  • 4. What is Kernel?  It is the core of a computer operating system that provides basic services for all other parts of the operating system. What is command-line?  Command-line interface - CLI : tool which is used to type text commands to perform specific tasks  Shell : The application or user interface that accepts user’s typed responses and displays the data on the screen
  • 5. What is root (superuser)?  A special user account used for system administration - has control over the entire Linux system  the user with a user identifier (UID) of zero  the only user account with permission to modify the root directory of a Unix system  It is capable of doing what normal users can’t, such as, changing ownership of files, adding or removing files from system directories, installing new packages and many others.  “/” or “root” directory is different from “root” user.
  • 6. Understanding and using “sudo” (super user do)  sudo is a program for Unix-like computer operating systems that allow users to run programs with the security privileges of another user, by default the superuser.  It prompts for personal password and confirms given request to execute a command by checking a file, called sudoers, which the system administrator configures.  Usage: - sudo su - su - - sudo apt-get update - sudo apt-get upgrade - sudo apt-get update &sudo apt-get upgrade Switch to “root” user Use “sudo” to install packages
  • 7. Understanding and using “sudo” (contd…)
  • 8. Understanding and using basic commands  What is Linux Home directory?  Check present working directory - pwd  Switch directories - cd  View directory contents - ls  View file contents - cat  List logged-in users: - users - who - whoami - last  Check ubuntu server version - lsb_release  Search for files – locate  Clear the terminal – clear  Show command history - history  Using auto-complete feature  What are man pages?
  • 9. What is Linux Home Directory?  Linux is a multi-user operating system, which means that more than one users can access the OS at the same time. Each user is assigned a directory where he/she can store their personal files. This directory is known as a user's home directory.  Each user has complete control over his home directory as well as all its sub-directories. He/She can freely perform operations like: -create and delete files/directories -install programs, and more, inside their home directory  a user’s home directory has the same name as their login name.  home directories are found under the home directory (/home).
  • 10. Checking Present Working Directory (pwd)  Whenever a user opens up a command line shell in Linux, it starts at the user’s home directory by default. This is user’s present working directory, which changes when he switches to some other directory.  pwd command is used to check the complete path of user’s present working directory at any point of time.
  • 11. Switch directories (cd)  command to navigate through the Linux filesystem  this command requires either a directory name or its complete path depending upon where the directory is present  Usage: -cd /path/to/ or -cd directory_name -cd .. -cd - -cd ~ -cd / Switch immediately to home directory regardless of what present working directory is. Switch back and forth between directories (toggling) Switch to parent directory (single dot represents current directory) Switch to root directory
  • 12. View directory contents – ls  lists the contents of a directory.  the output of the ls command is color coded.  different colors represent different types of files, making it easy to visually identify them.  Color codes: - Blue (Directories), - White (Text files), - Red (Archives), - Cyan (Links), - Green (Executables), - Pink (Images), - Yellow (Device Files)
  • 13. View directory contents – ls (contd…)  Usage -ls directoryName/directoryPath -Options:  -l : detailed listing  -a : show hidden files  -t : sort list based on timestamp  -S : sort list by file size  -r : reverse the sorting  -d : list directories only, not their contents  -h : print human readable sizes (e.g., 1K 234M 2G)  use combination : -lShrt
  • 14. View File Contents - cat  Prints out file’s contents on standard output  Command:  cat FILE1.txt  cat FILE1.txt FILE2.txt  cat FILE1.txt - FILE2.txt : Output FILE1's contents, take input from user, and then output FILE2's contents  Options:  -E : display $ at end of each line  -n : number all output lines
  • 15. List logged-in users  Commands to check the complete list of logged in users either current or all those attempts which have been made to connect user’s machine by any user and the status of connection  Users : prints user names of currently logged in users  Last –a : displays a list of all users logged in (and out) since the OS is installed  Who : shows currently logged in users with time details  Whoami : prints the user name associated with the current effective user ID
  • 16. Show command history – (history)  history command shows a list of all the recently used commands  up/down arrows are used to loop through them  The Ctrl+R shortcut key will start a search mode where the first few characters of a command are typed to search through recent history
  • 17. Using auto-complete feature  tab key is used to auto complete long names and paths easily  In case of similar initial names, shell displays all the names that it can use for auto completion
  • 18. What are man pages?  To learn more about Linux commands, users can head over to the respective man (or Manual) pages that come preinstalled with Linux.  To open a man page, man command followed by the command name is run.