SlideShare a Scribd company logo
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...

More Related Content

What's hot (20)

PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
PPTX
Slab Allocator in Linux Kernel
Adrian Huang
 
PPT
Linux Administration
Harish1983
 
PPT
Oracle archi ppt
Hitesh Kumar Markam
 
PPT
Introduction to Makefile
Tusharadri Sarkar
 
ODP
PostgreSQL Administration for System Administrators
Command Prompt., Inc
 
PDF
Deploying Flink on Kubernetes - David Anderson
Ververica
 
PDF
Long live to CMAN!
Ludovico Caldara
 
PDF
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama
 
PPTX
Introduction to Redis
TO THE NEW | Technology
 
PDF
Linux File System
Anil Kumar Pugalia
 
PDF
The Apache Spark File Format Ecosystem
Databricks
 
PPT
Introduction to Linux Kernel by Quontra Solutions
QUONTRASOLUTIONS
 
PPTX
Linux architecture
ICI Bucharest - roTLD
 
PPTX
Access control list acl - permissions in linux
Sreenatha Reddy K R
 
PDF
Page cache in Linux kernel
Adrian Huang
 
PPTX
Basic commands of linux
shravan saini
 
PPT
Basic Unix
Rajesh Kumar
 
PPTX
RHCSA EX200 - Summary
Nugroho Gito
 
PDF
DOAG Oracle Unified Audit in Multitenant Environments
Stefan Oehrli
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
Slab Allocator in Linux Kernel
Adrian Huang
 
Linux Administration
Harish1983
 
Oracle archi ppt
Hitesh Kumar Markam
 
Introduction to Makefile
Tusharadri Sarkar
 
PostgreSQL Administration for System Administrators
Command Prompt., Inc
 
Deploying Flink on Kubernetes - David Anderson
Ververica
 
Long live to CMAN!
Ludovico Caldara
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama
 
Introduction to Redis
TO THE NEW | Technology
 
Linux File System
Anil Kumar Pugalia
 
The Apache Spark File Format Ecosystem
Databricks
 
Introduction to Linux Kernel by Quontra Solutions
QUONTRASOLUTIONS
 
Linux architecture
ICI Bucharest - roTLD
 
Access control list acl - permissions in linux
Sreenatha Reddy K R
 
Page cache in Linux kernel
Adrian Huang
 
Basic commands of linux
shravan saini
 
Basic Unix
Rajesh Kumar
 
RHCSA EX200 - Summary
Nugroho Gito
 
DOAG Oracle Unified Audit in Multitenant Environments
Stefan Oehrli
 

Viewers also liked (20)

PDF
Grails internationalization-160524154831
NexThoughts Technologies
 
PPTX
Grails custom tag lib
NexThoughts Technologies
 
PPTX
Spring boot
NexThoughts Technologies
 
ODP
Groovy intro
NexThoughts Technologies
 
PPTX
Java reflection
NexThoughts Technologies
 
PPTX
MetaProgramming with Groovy
NexThoughts Technologies
 
PPTX
Actors model in gpars
NexThoughts Technologies
 
PPT
Grails Controllers
NexThoughts Technologies
 
PPTX
Grails services
NexThoughts Technologies
 
PPTX
Groovy DSL
NexThoughts Technologies
 
PPTX
Grails with swagger
NexThoughts Technologies
 
ODP
Command objects
NexThoughts Technologies
 
PPTX
Grails domain classes
NexThoughts Technologies
 
PDF
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Grails internationalization-160524154831
NexThoughts Technologies
 
Grails custom tag lib
NexThoughts Technologies
 
Java reflection
NexThoughts Technologies
 
MetaProgramming with Groovy
NexThoughts Technologies
 
Actors model in gpars
NexThoughts Technologies
 
Grails Controllers
NexThoughts Technologies
 
Grails services
NexThoughts Technologies
 
Grails with swagger
NexThoughts Technologies
 
Command objects
NexThoughts Technologies
 
Grails domain classes
NexThoughts Technologies
 
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Ad

Similar to Bootcamp linux commands (20)

PDF
3.1.a linux commands reference
Acácio Oliveira
 
PDF
Mastering the Unix Command Line
Howard Mao
 
PPTX
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
 
PPS
QSpiders - Unix Operating Systems and Commands
Qspiders - Software Testing Training Institute
 
PPT
Linux ppt
Sanmuga Nathan
 
PPTX
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
PDF
Basics of Linux Commands, Git and Github
Devang Garach
 
DOCX
232623113-Basic-Linux-Commands.docx linux unix
mahakbhogill
 
PPTX
Topic 3-1_More_Linux_Commands.pptx
dulala3
 
TXT
Unix3
Krishna Prasad
 
PDF
Quick guide of the most common linux commands
Carlos Enrique
 
PPT
Learning Linux v2.1
sdiviney
 
PPTX
Unix Trainning Doc.pptx
KalpeshRaut7
 
PPTX
Linux basics part 1
Lilesh Pathe
 
PPT
3. intro
Harsh Shrimal
 
PPTX
various shell commands in unix operating system.pptx
ssuserc26f8f
 
PPTX
LINUX_admin_commands.pptx
GuhanSenthil2
 
PPT
linux-lecture4.ppt
LuigysToro
 
PPTX
Basic Linux Administration - 3.pptxon server
RekeshPatel
 
PDF
Unix Basics Commands
Sameeran Jenna
 
3.1.a linux commands reference
Acácio Oliveira
 
Mastering the Unix Command Line
Howard Mao
 
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
 
QSpiders - Unix Operating Systems and Commands
Qspiders - Software Testing Training Institute
 
Linux ppt
Sanmuga Nathan
 
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
Basics of Linux Commands, Git and Github
Devang Garach
 
232623113-Basic-Linux-Commands.docx linux unix
mahakbhogill
 
Topic 3-1_More_Linux_Commands.pptx
dulala3
 
Quick guide of the most common linux commands
Carlos Enrique
 
Learning Linux v2.1
sdiviney
 
Unix Trainning Doc.pptx
KalpeshRaut7
 
Linux basics part 1
Lilesh Pathe
 
3. intro
Harsh Shrimal
 
various shell commands in unix operating system.pptx
ssuserc26f8f
 
LINUX_admin_commands.pptx
GuhanSenthil2
 
linux-lecture4.ppt
LuigysToro
 
Basic Linux Administration - 3.pptxon server
RekeshPatel
 
Unix Basics Commands
Sameeran Jenna
 
Ad

More from NexThoughts Technologies (20)

PDF
Alexa skill
NexThoughts Technologies
 
PDF
Docker & kubernetes
NexThoughts Technologies
 
PDF
Apache commons
NexThoughts Technologies
 
PDF
Microservice Architecture using Spring Boot with React & Redux
NexThoughts Technologies
 
PDF
Solid Principles
NexThoughts Technologies
 
PDF
Introduction to TypeScript
NexThoughts Technologies
 
PDF
Smart Contract samples
NexThoughts Technologies
 
PDF
My Doc of geth
NexThoughts Technologies
 
PDF
Geth important commands
NexThoughts Technologies
 
PDF
Ethereum genesis
NexThoughts Technologies
 
PPTX
Springboot Microservices
NexThoughts Technologies
 
PDF
An Introduction to Redux
NexThoughts Technologies
 
PPTX
Google authentication
NexThoughts Technologies
 
Docker & kubernetes
NexThoughts Technologies
 
Apache commons
NexThoughts Technologies
 
Microservice Architecture using Spring Boot with React & Redux
NexThoughts Technologies
 
Solid Principles
NexThoughts Technologies
 
Introduction to TypeScript
NexThoughts Technologies
 
Smart Contract samples
NexThoughts Technologies
 
My Doc of geth
NexThoughts Technologies
 
Geth important commands
NexThoughts Technologies
 
Ethereum genesis
NexThoughts Technologies
 
Springboot Microservices
NexThoughts Technologies
 
An Introduction to Redux
NexThoughts Technologies
 
Google authentication
NexThoughts Technologies
 

Recently uploaded (20)

PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 

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 [email protected] -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 [email protected]: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