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)

PPT
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
PDF
Course 102: Lecture 5: File Handling Internals
Ahmed El-Arabawy
 
PDF
Engineering Solution
M.T.H Group
 
PDF
Linux commands
debashis rout
 
PDF
Course 102: Lecture 3: Basic Concepts And Commands
Ahmed El-Arabawy
 
PDF
BusyBox for Embedded Linux
Emertxe Information Technologies Pvt Ltd
 
PPT
Unix/Linux Basic Commands and Shell Script
sbmguys
 
PPTX
QEMU and Raspberry Pi. Instant Embedded Development
GlobalLogic Ukraine
 
PPTX
Selinux
Mohitgupta8560
 
PDF
Porting Android
Opersys inc.
 
PPT
Introduction to ms dos
Indika Rathninda
 
PDF
Linux Terminal commands for Devops.pdf
Nambi Nam
 
PDF
Part 02 Linux Kernel Module Programming
Tushar B Kute
 
PDF
Presentation aix basic
xKinAnx
 
PDF
Embedded Android : System Development - Part III (Audio / Video HAL)
Emertxe Information Technologies Pvt Ltd
 
PDF
Xen Debugging
The Linux Foundation
 
PDF
Linux, Apache, Mysql, PHP
webhostingguy
 
PDF
Course 102: Lecture 9: Input Output Internals
Ahmed El-Arabawy
 
PPT
Лекція №1
Michael Attwood
 
PDF
systemd
nussbauml
 
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
Course 102: Lecture 5: File Handling Internals
Ahmed El-Arabawy
 
Engineering Solution
M.T.H Group
 
Linux commands
debashis rout
 
Course 102: Lecture 3: Basic Concepts And Commands
Ahmed El-Arabawy
 
BusyBox for Embedded Linux
Emertxe Information Technologies Pvt Ltd
 
Unix/Linux Basic Commands and Shell Script
sbmguys
 
QEMU and Raspberry Pi. Instant Embedded Development
GlobalLogic Ukraine
 
Porting Android
Opersys inc.
 
Introduction to ms dos
Indika Rathninda
 
Linux Terminal commands for Devops.pdf
Nambi Nam
 
Part 02 Linux Kernel Module Programming
Tushar B Kute
 
Presentation aix basic
xKinAnx
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Emertxe Information Technologies Pvt Ltd
 
Xen Debugging
The Linux Foundation
 
Linux, Apache, Mysql, PHP
webhostingguy
 
Course 102: Lecture 9: Input Output Internals
Ahmed El-Arabawy
 
Лекція №1
Michael Attwood
 
systemd
nussbauml
 

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
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Digital Circuits, important subject in CS
contactparinay1
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 

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