SlideShare a Scribd company logo
Linux Basics
Geeta Vinnakota
Outline
• Terms
• Releases
• File System
• Package Management
• Environment Variables
• Processes
• User Management
• Command Enhancements
• Aliases
• Network Management
• Terminal Tips & Misc
1/23/2016 2
Philosophy of Linux
• Linux does not assume anything.
• Lets you install what you need rather than give you a bunch of things
you may not need
• Linux commands and case sensitive
1/23/2016 3
Terms
Term
Kernel Takes care of resource allocation
Shell Accepts command and passes it to kernel
Service Application that runs in the background
1/23/2016 4
Releases
lsb_release -a Prints the release, codename and description
lsb_release -sc Prints the codename
ubuntu-support-status Check status of the release and packages
uname -r prints kernel version
Release Upgrade Steps
sudo apt-get update Step-1
sudo apt-get update update-manager-core Step-2
sudo do-release-upgrade Step-3
1/23/2016 5
File System - Important Directories
/var/run pids for important processes
/var/log log files
/etc/init Configuration Files
/etc/init.d Scripts that respond to start and stop
/etc/hosts DNS
/etc/passwd User database
/etc/ssh SSH configuration
/etc/my.cnf MySQL configuration
/opt/ Optional packages not part of the default installation
~ Home directory
~/.ssh Known Hosts, Authentication Keys
~/.bash_profile Startup File. Defines aliases and configuration
1/23/2016 6
Package Management
apt Advanced Packaging Tool
/etc/apt/sources.list Stores the list of available packages
deb – Repos containing binarires
deb-src – Repos containing source code for packages
sudo apt-get update Checks for new versions
sudo apt-get install nmap To install the package nmap
sudo apt-get remove nmap To remove the package nmap
1/23/2016 7
Environment Variables
env View all environment variables
env | grep PATH
echo $PATH
echo $USER prints current user
1/23/2016 8
Processes
Processes are the core of Linux OS. A process is an instance of a running command.
init First process with id 1. Cannot be killed. Every other process is a child of init
daemon is a background process
htop interactive tool to list and manage processes
Prints CPU & memory utilization of each process
crontab –l list all background scheduled processes
crontab –e edit the crontab
1/23/2016 9
User Management
compgen –u List all users
compgen –g List all groups
sudo su – user2 Switch to user2
sudo Run commands as root user
1/23/2016 10
Command Enhancements
time cmd prints the time taken to execute cmd
cmd1 | cmd2 pass the output of the previous cmd1 to in the input
of the next cmd2
cmd & Execute cmd in the background and return
./cmd bypass an alias
man cmd Manual entry for cmd
whatis cmd Documentation for cmd
screen -x screen sharing between users
1/23/2016 11
Aliases
Aliases help replace 1 string with another while execution. Aliases are usually defined in the configuration file
like .bash_profile
alias ll=“ls—l” Creates an alias
alias ll gets the alias
single quotes variables are not expanded
double quotes variables are expanded
1/23/2016 12
Network Management
netstat -ntlp Network Statistics - List of ports listening
telnet host port Check if the port on the host is listening
iostat Input Output Statistics
host google.com DNS lookup
ping google.com Check is server is active
du disk usage statistics
ifconfig Configure network interface parameters
1/23/2016 13
Terminal Tips & Misc
cmd + R clears terminal
ctrl + R Search through command history
sudo reboot reboot machine & logout
#! /bin/bash Hash bang. First line of a script. Uses bash interpreter
1/23/2016 14

More Related Content

What's hot

Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
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
sbmguys
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
Harish1983
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
atozknowledge .com
 
Linux basics
Linux basicsLinux basics
Linux basics
Shagun Rathore
 
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)
Rodrigo Maia
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
Angus Li
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
mentorsnet
 
Top 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu CommandsTop 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu Commands
Yusuf Felly
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Linux basic
Linux basicLinux basic
Linux basic
Pragyagupta37
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commandsaaj_sarkar06
 
Basic commands
Basic commandsBasic commands
Basic commands
ambilivava
 

What's hot (20)

Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
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
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux commands
Linux commandsLinux commands
Linux commands
 
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 Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
Top 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu CommandsTop 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu Commands
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux basic
Linux basicLinux basic
Linux basic
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commands
 
Basic commands
Basic commandsBasic commands
Basic commands
 
Linux
Linux Linux
Linux
 

Similar to Linux basics

Linux Systems Programming: Ubuntu Installation and Configuration
Linux Systems Programming: Ubuntu Installation and ConfigurationLinux Systems Programming: Ubuntu Installation and Configuration
Linux Systems Programming: Ubuntu Installation and Configuration
RashidFaridChishti
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
Monitoring CPU Utilization on LINUX (Shell Script Project)
Monitoring CPU Utilization on LINUX (Shell Script Project)Monitoring CPU Utilization on LINUX (Shell Script Project)
Monitoring CPU Utilization on LINUX (Shell Script Project)Dmitry Ponomarenko
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
Ishan A B Ambanwela
 
Linux training
Linux trainingLinux training
Linux training
artisriva
 
Linux introduction Class 03
Linux introduction Class 03Linux introduction Class 03
Linux introduction Class 03
Adrian Mikeliunas
 
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
Wlademir RS
 
Linux
LinuxLinux
Sistemas operacionais 8
Sistemas operacionais 8Sistemas operacionais 8
Sistemas operacionais 8
Nauber Gois
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Daemons
DaemonsDaemons
Daemons
christina555
 
Linux Day2
Linux Day2Linux Day2
Linux Day2
Bùi Quang Lâm
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
perweeng31
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
Abubakr Cheema
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
Anatoliy Okhotnikov
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questionsTeja Bheemanapally
 

Similar to Linux basics (20)

Linux Systems Programming: Ubuntu Installation and Configuration
Linux Systems Programming: Ubuntu Installation and ConfigurationLinux Systems Programming: Ubuntu Installation and Configuration
Linux Systems Programming: Ubuntu Installation and Configuration
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux lecture6
Linux lecture6Linux lecture6
Linux lecture6
 
Monitoring CPU Utilization on LINUX (Shell Script Project)
Monitoring CPU Utilization on LINUX (Shell Script Project)Monitoring CPU Utilization on LINUX (Shell Script Project)
Monitoring CPU Utilization on LINUX (Shell Script Project)
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Linux training
Linux trainingLinux training
Linux training
 
Linux introduction Class 03
Linux introduction Class 03Linux introduction Class 03
Linux introduction Class 03
 
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
 
Linux
LinuxLinux
Linux
 
Sistemas operacionais 8
Sistemas operacionais 8Sistemas operacionais 8
Sistemas operacionais 8
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Daemons
DaemonsDaemons
Daemons
 
Linux
LinuxLinux
Linux
 
Linux Day2
Linux Day2Linux Day2
Linux Day2
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questions
 

More from Geeta Vinnakota

Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
Geeta Vinnakota
 
Nginx
NginxNginx
Linux files
Linux filesLinux files
Linux files
Geeta Vinnakota
 
Git
GitGit
Rspec
RspecRspec
Problem solving strategies
Problem solving strategiesProblem solving strategies
Problem solving strategies
Geeta Vinnakota
 

More from Geeta Vinnakota (6)

Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Nginx
NginxNginx
Nginx
 
Linux files
Linux filesLinux files
Linux files
 
Git
GitGit
Git
 
Rspec
RspecRspec
Rspec
 
Problem solving strategies
Problem solving strategiesProblem solving strategies
Problem solving strategies
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 

Linux basics

  • 2. Outline • Terms • Releases • File System • Package Management • Environment Variables • Processes • User Management • Command Enhancements • Aliases • Network Management • Terminal Tips & Misc 1/23/2016 2
  • 3. Philosophy of Linux • Linux does not assume anything. • Lets you install what you need rather than give you a bunch of things you may not need • Linux commands and case sensitive 1/23/2016 3
  • 4. Terms Term Kernel Takes care of resource allocation Shell Accepts command and passes it to kernel Service Application that runs in the background 1/23/2016 4
  • 5. Releases lsb_release -a Prints the release, codename and description lsb_release -sc Prints the codename ubuntu-support-status Check status of the release and packages uname -r prints kernel version Release Upgrade Steps sudo apt-get update Step-1 sudo apt-get update update-manager-core Step-2 sudo do-release-upgrade Step-3 1/23/2016 5
  • 6. File System - Important Directories /var/run pids for important processes /var/log log files /etc/init Configuration Files /etc/init.d Scripts that respond to start and stop /etc/hosts DNS /etc/passwd User database /etc/ssh SSH configuration /etc/my.cnf MySQL configuration /opt/ Optional packages not part of the default installation ~ Home directory ~/.ssh Known Hosts, Authentication Keys ~/.bash_profile Startup File. Defines aliases and configuration 1/23/2016 6
  • 7. Package Management apt Advanced Packaging Tool /etc/apt/sources.list Stores the list of available packages deb – Repos containing binarires deb-src – Repos containing source code for packages sudo apt-get update Checks for new versions sudo apt-get install nmap To install the package nmap sudo apt-get remove nmap To remove the package nmap 1/23/2016 7
  • 8. Environment Variables env View all environment variables env | grep PATH echo $PATH echo $USER prints current user 1/23/2016 8
  • 9. Processes Processes are the core of Linux OS. A process is an instance of a running command. init First process with id 1. Cannot be killed. Every other process is a child of init daemon is a background process htop interactive tool to list and manage processes Prints CPU & memory utilization of each process crontab –l list all background scheduled processes crontab –e edit the crontab 1/23/2016 9
  • 10. User Management compgen –u List all users compgen –g List all groups sudo su – user2 Switch to user2 sudo Run commands as root user 1/23/2016 10
  • 11. Command Enhancements time cmd prints the time taken to execute cmd cmd1 | cmd2 pass the output of the previous cmd1 to in the input of the next cmd2 cmd & Execute cmd in the background and return ./cmd bypass an alias man cmd Manual entry for cmd whatis cmd Documentation for cmd screen -x screen sharing between users 1/23/2016 11
  • 12. Aliases Aliases help replace 1 string with another while execution. Aliases are usually defined in the configuration file like .bash_profile alias ll=“ls—l” Creates an alias alias ll gets the alias single quotes variables are not expanded double quotes variables are expanded 1/23/2016 12
  • 13. Network Management netstat -ntlp Network Statistics - List of ports listening telnet host port Check if the port on the host is listening iostat Input Output Statistics host google.com DNS lookup ping google.com Check is server is active du disk usage statistics ifconfig Configure network interface parameters 1/23/2016 13
  • 14. Terminal Tips & Misc cmd + R clears terminal ctrl + R Search through command history sudo reboot reboot machine & logout #! /bin/bash Hash bang. First line of a script. Uses bash interpreter 1/23/2016 14