SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Bootcamp
Linux Commands...
@Nexthoughts
Background of Linux
Version of UNIX
Linus Torvalds – Creator of Linux
Open Source Operating System
Free Software
Source Code Available
Where is Linux used?
→ 75% of respondents were already using Linux and another
14% were evaluating it
→ 43% of all web sites use Linux servers running the Apache
Web server
How Linux is used?
Personal Workstation
File and Print Server
Internet Service Provider
Three-tier Client/Server
About Kernel:
Linux kernel for free
Kernel is central component
Kernel can be customized to user’s needs
Unix Commands
A command is a program which interacts with the kernel to
provide the environment and perform the functions called for
by the user.
A command can be: a built-in shell command; an executable
shell file, known as a shell script; or a source compiled, object
code file.
The shell is a command line interpreter. The user interacts
with the kernel through the shell. You can write ASCII (text)
scripts to be acted upon by a shell.
Taking Help
The man command displays reference pages for the
command you specify.
The UNIX man pages (man is short for manual ) cover every
command available.
To search for a man page, enter man followed by the name of the
command to find .
For example:
% man cp
Or try:
% man man
Files Related Commands
ls
List directory contents
Has whole bunch of options.
•% ls
all files except those starting with a
“.”
•% ls -a
all
•% ls -A
all without “.” and “..”
• % ls -F
append “/” to dirs and “*” to
executables
• % ls -l
long format
• % ls -al
• % ls -lt
sort by modification time (latest -
earliest)
• % ls -ltr
reverse
cp
Copies files / directories.
% cp [options] <source> <destination>
% cp file1 file2
% cp file1 [file2] … /directory
Useful option: -i to prevent overwriting existing files and
prompt the user to confirm.
mv
Moves or renames files/directories.
% mv <source> <destination>
The <source> gets removed
% mv file1 dir/
% mv dir1 dir2
rm
Removes file(s) and/or directories.
% rm file1 [file2]
% rm -r dir1 [dir2]
Directories
cd
Changes your current directory to a new one.
% cd /some/other/dir
Absolute path
% cd subdir
Assuming subdir is in the current directory.
% cd
Returns you to your home directory.
mkdir
Creates a directory.
% mkdir newdir
pwd
Displays personal working directory,
i.e. your current directory.
% pwd
rmdir
Removes a directory.
% rmdir dirname
chmod
Changes file permissions
Possible invocations
% chmod 600 filename
-rw------- 1 user group 2785 Feb 8 14:18 filename
(a bit not intuitive where 600 comes from)
(owner) (group) (others)
chmod [number][number][number] file1
Number = (read)4 + (write)2 + (execute)1
Example: Chmod 754 file1
for owner: read, write and execute permissions (4+2+1)
for group: read and execute permissions (4+0+1)
for others: only read permission (4+0+0)
chmod
Some of the things these commands manipulate:
The time stamp: Each file has three dates associated with it. These are creation
time, last modification time and last access time.
The owner: the owner of files
The group: the group of users
The permissions: read, write, execute permissions of files. The permissions tell
unix who can access what file, or change it, or, in the case of programs, execute
it. Each of these permissions can be toggled separately for the owner, the group,
and all the other users.
chmod
drwxr-xr-x 2 dag users 6 Dec 6 2000 netscape
owner
group
others
file name
read, write, execute
permissions of files
grep
Searches its input for a pattern.
The pattern can be a simple substring or a complex
regular expression.
If a line matches, it’s directed to STDOUT; otherwise,
it’s discarded.
% echo “blah-foo” | grep blah
Will print the matching line
% echo “blah-foo” | grep zee
Will not.
alias
Defined a new name for a command
% alias
with no arguments lists currently active aliases
% alias newcommand oldcommand
defines a newcommand
ssh
ssh (SSH client) is a program for logging into a
remote machine and for executing commands on a remote
machine.
It provide secure encrypted communications between two
untrusted hosts over an insecure network.
ssh -i /home/narendra/.ssh/keir_wp.pem -o
IdentitiesOnly=yes ubuntu@52.19.236.56 -v
scp
Scp (Secure Copy) is a command line tool to copy or
transfer files across hosts.
It uses the same kind of security mechanism like the
ssh program.
It uses an ssh connection in the background to perform
the file transfer.
Scp <source> <destination>
Copy the file "foobar.txt" from a remote host to the
local host
scp your_username@remotehost.edu:foobar.txt
/some/local/directory
Copy the file "foobar.txt" from remote host "rh1.edu"
to remote host "rh2.edu"
clear
Clears the screen
There’s an alias for it: Ctrl+L
Example sequence:
% cal
% clear
% cal
Ctrl+L
exit / logout
Exit from your login session.
% exit
% logout
shutdown
Causes system to shutdown or reboot
cleanly.
May require superuser privileges
% shutdown -h now - stop
% shutdown -r now - reboot
Thanks for listening...

Weitere ähnliche Inhalte

Was ist angesagt?

Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 
Regular Expressions grep and egrep
Regular Expressions grep and egrepRegular Expressions grep and egrep
Regular Expressions grep and egrep
Tri Truong
 
Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagram
Roberto Castro
 

Was ist angesagt? (20)

Presentation aix basic
Presentation   aix basicPresentation   aix basic
Presentation aix basic
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
Course 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsCourse 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild Cards
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Course 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking HelpCourse 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking Help
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA's
 
Linux
LinuxLinux
Linux
 
Regular Expressions grep and egrep
Regular Expressions grep and egrepRegular Expressions grep and egrep
Regular Expressions grep and egrep
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Job Automation using Linux
Job Automation using LinuxJob Automation using Linux
Job Automation using Linux
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagram
 

Andere mochten auch

Andere mochten auch (20)

Grails internationalization-160524154831
Grails internationalization-160524154831Grails internationalization-160524154831
Grails internationalization-160524154831
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
G pars
G parsG pars
G pars
 
Twilio
TwilioTwilio
Twilio
 
Spring boot
Spring bootSpring boot
Spring boot
 
Gorm
GormGorm
Gorm
 
Groovy
GroovyGroovy
Groovy
 
Groovy intro
Groovy introGroovy intro
Groovy intro
 
Java reflection
Java reflectionJava reflection
Java reflection
 
MetaProgramming with Groovy
MetaProgramming with GroovyMetaProgramming with Groovy
MetaProgramming with Groovy
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
 
Grails services
Grails servicesGrails services
Grails services
 
Groovy DSL
Groovy DSLGroovy DSL
Groovy DSL
 
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
 
Command objects
Command objectsCommand objects
Command objects
 
Grails domain classes
Grails domain classesGrails domain classes
Grails domain classes
 
Jmh
JmhJmh
Jmh
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
 

Ähnlich wie Bootcamp linux commands

Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Sudharsan S
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
Dima Gomaa
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
Kuldeep Tiwari
 

Ähnlich wie Bootcamp linux commands (20)

Linux presentation
Linux presentationLinux presentation
Linux presentation
 
3. intro
3. intro3. intro
3. intro
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
cisco
ciscocisco
cisco
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Linux
LinuxLinux
Linux
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Linux
LinuxLinux
Linux
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
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
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
 

Mehr von NexThoughts Technologies

Mehr von NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Ethereum
EthereumEthereum
Ethereum
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Bootcamp linux commands

  • 2. Background of Linux Version of UNIX Linus Torvalds – Creator of Linux Open Source Operating System Free Software Source Code Available
  • 3. Where is Linux used? → 75% of respondents were already using Linux and another 14% were evaluating it → 43% of all web sites use Linux servers running the Apache Web server
  • 4. How Linux is used? Personal Workstation File and Print Server Internet Service Provider Three-tier Client/Server About Kernel: Linux kernel for free Kernel is central component Kernel can be customized to user’s needs
  • 5. Unix Commands A command is a program which interacts with the kernel to provide the environment and perform the functions called for by the user. A command can be: a built-in shell command; an executable shell file, known as a shell script; or a source compiled, object code file. The shell is a command line interpreter. The user interacts with the kernel through the shell. You can write ASCII (text) scripts to be acted upon by a shell.
  • 6. Taking Help The man command displays reference pages for the command you specify. The UNIX man pages (man is short for manual ) cover every command available. To search for a man page, enter man followed by the name of the command to find . For example: % man cp Or try: % man man
  • 8. ls List directory contents Has whole bunch of options. •% ls all files except those starting with a “.” •% ls -a all •% ls -A all without “.” and “..” • % ls -F append “/” to dirs and “*” to executables • % ls -l long format • % ls -al • % ls -lt sort by modification time (latest - earliest) • % ls -ltr reverse
  • 9. cp Copies files / directories. % cp [options] <source> <destination> % cp file1 file2 % cp file1 [file2] … /directory Useful option: -i to prevent overwriting existing files and prompt the user to confirm.
  • 10. mv Moves or renames files/directories. % mv <source> <destination> The <source> gets removed % mv file1 dir/ % mv dir1 dir2
  • 11. rm Removes file(s) and/or directories. % rm file1 [file2] % rm -r dir1 [dir2]
  • 13. cd Changes your current directory to a new one. % cd /some/other/dir Absolute path % cd subdir Assuming subdir is in the current directory. % cd Returns you to your home directory.
  • 15. pwd Displays personal working directory, i.e. your current directory. % pwd
  • 17. chmod Changes file permissions Possible invocations % chmod 600 filename -rw------- 1 user group 2785 Feb 8 14:18 filename (a bit not intuitive where 600 comes from) (owner) (group) (others) chmod [number][number][number] file1 Number = (read)4 + (write)2 + (execute)1 Example: Chmod 754 file1 for owner: read, write and execute permissions (4+2+1) for group: read and execute permissions (4+0+1) for others: only read permission (4+0+0)
  • 18. chmod Some of the things these commands manipulate: The time stamp: Each file has three dates associated with it. These are creation time, last modification time and last access time. The owner: the owner of files The group: the group of users The permissions: read, write, execute permissions of files. The permissions tell unix who can access what file, or change it, or, in the case of programs, execute it. Each of these permissions can be toggled separately for the owner, the group, and all the other users.
  • 19. chmod drwxr-xr-x 2 dag users 6 Dec 6 2000 netscape owner group others file name read, write, execute permissions of files
  • 20. grep Searches its input for a pattern. The pattern can be a simple substring or a complex regular expression. If a line matches, it’s directed to STDOUT; otherwise, it’s discarded. % echo “blah-foo” | grep blah Will print the matching line % echo “blah-foo” | grep zee Will not.
  • 21. alias Defined a new name for a command % alias with no arguments lists currently active aliases % alias newcommand oldcommand defines a newcommand
  • 22. ssh ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It provide secure encrypted communications between two untrusted hosts over an insecure network. ssh -i /home/narendra/.ssh/keir_wp.pem -o IdentitiesOnly=yes ubuntu@52.19.236.56 -v
  • 23. scp Scp (Secure Copy) is a command line tool to copy or transfer files across hosts. It uses the same kind of security mechanism like the ssh program. It uses an ssh connection in the background to perform the file transfer. Scp <source> <destination> Copy the file "foobar.txt" from a remote host to the local host scp your_username@remotehost.edu:foobar.txt /some/local/directory Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"
  • 24. clear Clears the screen There’s an alias for it: Ctrl+L Example sequence: % cal % clear % cal Ctrl+L
  • 25. exit / logout Exit from your login session. % exit % logout
  • 26. shutdown Causes system to shutdown or reboot cleanly. May require superuser privileges % shutdown -h now - stop % shutdown -r now - reboot