SlideShare a Scribd company logo
Linux System Administration
Linux Commands
LINUX COMMANDS
UNIX Commands
Linux 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.
UNIX Shell
Linux Commands
The shell sits between you and the operating
system, acting as a command interpreter.
It reads your terminal input and translates the
commands into actions taken by the system. The
shell is analogous to command.com in DOS.
When you log into the system you are given a
default shell.
When the shell starts up it reads its startup files
and may set environment variables, command
search paths, and command aliases, and executes
any commands specified in these files.
UNIX Shell
Linux Commands
The original shell was the Bourne shell, sh.
Every Unix platform will either have the Bourne shell,
or a Bourne compatible shell available.
The default prompt for the Bourne shell is $ (or #, for
the root user).
Another popular shell is C Shell. The default prompt
for the C shell is %.
UNIX Shell
Linux Commands
Numerous other shells are available from the
network. Almost all of them are based on either
sh or csh with extensions to provide job
control to sh, allow in-line editing of
commands, page through previously executed
commands, provide command name
completion and custom prompt, etc.
Some of the more well known of these may be
on your favorite Unix system: the Korn shell,
ksh, by David Korn and the Bourne Again
SHell, bash, from the Free Software
Foundations GNU project, both based on sh,
the T-C shell, tcsh, and the extended C shell,
cshe, both based on csh.
Shell Programming
Linux Commands
You can write shell programs by creating scripts
containing a series of shell commands.
The first line of the script should start with #!
which indicates to the kernel that the script is
directly executable.
You immediately follow this with the name of the
shell, or program (spaces are allowed), to execute,
using the full path name. So to set up a Bourne
shell script the first line would be: #! /bin/sh
Shell Programming
Linux Commands
The first line is followed by commands
Within the scripts # indicates a comment from that
point until the end of the line, with #! being a
special case if found as the first characters of the
file.
#!/bin/bash
cd /tmp
mkdir t
You also need to specify that the script is
executable by setting the proper bits on the file
with chmod, e.g.:
$ chmod +x shell_script
LINUX COMMANDS
Linux Commands
File Management and Viewing
Filesystem Mangement
Help, Job and Process Management
Network Management
System Management
User Management
Printing and Programming
Document Preparation
Miscellaneous
Command Structure
Linux Commands
Command <Options> <Arguments>
Multiple commands separated by ; can be executed
one after the other
Help Facilities for Commands
Linux Commands
To understand the working of the command and
possible options use (man command)
Using the GNU Info System (info, info command)
Listing a Description of a Program (whatis command)
Many tools have a long−style option, `−−help', that
outputs usage information about the tool, including
the options and arguments the tool takes. Ex:
whoami --help
Pipes
Linux Commands
An important early development in Unix was the
invention of "pipes," a way to pass the output of one
tool to the input of another.
eg. $ who | wc −l
By combining these two tools, giving the wc
command the output of who, you can build a new
command to list the number of users currently on the
system
Linux File Management and Viewing
Linux Commands
File and Directory management
cd Change the current directory. With no arguments "cd"
changes to the users home directory. (cd <directory
path>)
chmod Change the file permissions.
Ex: chmod 751 myfile : change the file permissions to
rwx for owner, rx for group and x for others
Ex: chmod go=+r myfile : Add read permission for the
group and others (character meanings u-user, g-group, o-
other, + add permission,-remove,r-read,w-write,x-exe)
Ex: chmod +s myfile - Setuid bit on the file which allows
the program to run with user or group privileges of the
Linux File Management and Viewing
Linux Commands
There are three such special permissions within Linux. They are:
setuid — used only for applications, this permission indicates that
the application is to run as the owner of the file and not as the user
executing the application. It is indicated by the character s in place of
the x in the owner category. If the owner of the file does not have
execute permissions, the S is capitalized to reflect this fact.
setgid — used primarily for applications, this permission indicates
that the application is to run as the group owning the file and not as
the group of the user executing the application. The setgid
permission is indicated by the character s in place of the x in the
group category. If the group owner of the file or directory does not
have execute permissions, the S is capitalized to reflect this fact.
sticky bit — used primarily on directories, this bit dictates that a file
created in the directory can be removed only by the user that created
the file. It is indicated by the character t in place of the x in the
everyone category. If the everyone category does not have execute
permissions, the T is capitalized to reflect this fact.
Linux File Management and Viewing
Linux Commands
chown Change owner.
Ex: chown <owner1> <filename> : Change ownership of
a file to owner1.
chgrp Change group.
Ex: chgrp <group1> <filename> : Change group of a file
to group1.
cp Copy a file from one location to another.
Ex: cp file1 file2 : Copy file1 to file2
Ex: cp –R dir1 dir2 : Copy dir1 to dir2
md5sum Prints the MD5 Checksum
Linux File Management and Viewing
Linux Commands
ls List contents of a directory.
Ex: ls, ls –l , ls –al, ls –ld, ls –R
(-rwxrwxr-x 1 juan juan 0 Sep 26 12:25 foo )
|more will list page wise
mkdir Make a directory.
Ex: mkdir <directory name> : Makes a directory
Ex mkdir –p /www/chache/var/log will create all the
directories starting from www.
mv Move or rename a file or directory.
Ex: mv <source> <destination>
Linux File Management and Viewing
Linux Commands
find Find files (find <start directory> -name <file name>
-print)
Ex: find /home –name readme -print
(Search for readme starting at home and output full path.)
“/home" = Search starting at the home directory and
proceed through all its subdirectories
"-name readme" = Search for a file named readme
"-print" = Output the full path to that file
locate File locating program that uses the slocate
database.
Ex: locate –u to create the database,
Linux File Management and Viewing
Linux Commands
pwd Print or list the present working directory with full
path.
rm Delete files (Remove files). (rm –rf <directory/file>)
rmdir Remove a directory. The directory must be empty.
(rmdir <directory>)
touch Change file timestamps to the current time. Make
the file if it doesn't exist. (touch <filename>)
whereis Locate the binary and man page files for a
command. (whereis <program/command>)
which Show full path of commands where given
commands reside. (which <command>)
Linux File Management and Viewing
Linux Commands
File viewing and editing
emacs Full screen editor.
pico Simple text editor.
vi Editor with a command mode and text mode. Starts in
command mode.
gedit GUI Text Editor
tail Look at the last 10 lines of a file.
Ex: tail –f <filename> ,
Ex: tail -100 <filename>
head Look at the first 10 lines of a file. (head <filename>)
Linux File Management and Viewing
Linux Commands
File compression, backing up and restoring
compress Compress data.
uncompress Expand data.
cpio Can store files on tapes. to/from archives.
gzip - zip a file to a gz file.
gunzip - unzip a gz file.
tar Archives files and directories. Can store files and
directories on tapes.
Ex: tar -zcvf <destination> <files/directories> - Archive
copy groups of files. tar –zxvf <compressed file> to
uncompress
zip – Compresses a file to a .zip file.
unzip – Uncompresses a file with .zip extension.
Linux File Management and Viewing
Linux Commands
cat View a file
Ex: cat filename
cmp Compare two files.
cut Remove sections from each line of files.
diff Show the differences between files.
Ex: diff file1 file2 : Find differences between file1 & file2.
echo Display a line of text.
Linux File Management and Viewing
Linux Commands
grep List all files with the specified expression.
(grep pattern <filename/directorypath>)
Ex: ls –l |grep sidbi : List all lines with a sidbi in them.
Ex: grep " R " : Search for R with a space on each side
sleep Delay for a specified amount of time.
sort Sort a file alphabetically.
uniq Remove duplicate lines from a sorted file.
wc Count lines, words, characters in a file. (wc –c/w/l
<filename>).
Thank You
Sreenatha Reddy K R
krsreenatha@gmail.com

More Related Content

What's hot

Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
kalyanineve
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
Tushar B Kute
 
Linux file system
Linux file systemLinux file system
Linux file system
Midaga Mengistu
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
Linux commands
Linux commandsLinux commands
Linux commands
penetration Tester
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
Sagar Kumar
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
Harish R
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
Md. Zahid Hossain Shoeb
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
MohanKumar Palanichamy
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
Stephen Ahiante
 

What's hot (20)

Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux
Linux Linux
Linux
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 

Viewers also liked

Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
Sreenatha Reddy K R
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
anandvaidya
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash Course
Jason Cannon
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
Sreenatha Reddy K R
 
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
 
Linux administration
Linux administrationLinux administration
Linux administration
Yogesh Ks
 
Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux Administration
Edureka!
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Linux commands
Linux commandsLinux commands
Linux commands
Mannu Khani
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
WE-IT TUTORIALS
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
Harish1983
 
Linux ppt
Linux pptLinux ppt
Linux ppt
lincy21
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
Omi Vichare
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Dheeraj Nambiar
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
swtjerin4u
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
Deepak Singhal
 
File Commands Of Linux Ii
File Commands Of Linux  IiFile Commands Of Linux  Ii
File Commands Of Linux Ii
mutharam
 
Vijai
VijaiVijai
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location
Acácio Oliveira
 

Viewers also liked (20)

Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash Course
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
Linux administration
Linux administrationLinux administration
Linux administration
 
Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux Administration
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Hacking for Dummies 2
Hacking for Dummies 2Hacking for Dummies 2
Hacking for Dummies 2
 
File Commands Of Linux Ii
File Commands Of Linux  IiFile Commands Of Linux  Ii
File Commands Of Linux Ii
 
Vijai
VijaiVijai
Vijai
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location
 

Similar to Linux commands and file structure

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
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
KiranMantri
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
chockit88
 
Directories description
Directories descriptionDirectories description
Directories description
Dr.M.Karthika parthasarathy
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unixsouthees
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
Tushar Jain
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
PrashantTechment
 
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
 
Suman bhatt
Suman bhattSuman bhatt
Suman bhatt
Tapas Bayen
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
BITS
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338Cam YP Co., Ltd
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
Cam YP Co., Ltd
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
Liran Ben Haim
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to LinuxDimas Prasetyo
 
60761 linux
60761 linux60761 linux
60761 linux
Ritika Ahlawat
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
amitkamble79
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
kavitha_tala
 

Similar to Linux commands and file structure (20)

Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Linux
LinuxLinux
Linux
 
Directories description
Directories descriptionDirectories description
Directories description
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
 
basic-unix.pdf
basic-unix.pdfbasic-unix.pdf
basic-unix.pdf
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
 
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
 
Suman bhatt
Suman bhattSuman bhatt
Suman bhatt
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
60761 linux
60761 linux60761 linux
60761 linux
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
 

More from Sreenatha Reddy K R

Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecases
Sreenatha Reddy K R
 
Linux security firewall and SELinux
Linux security firewall and SELinuxLinux security firewall and SELinux
Linux security firewall and SELinux
Sreenatha Reddy K R
 
Mail server setup
Mail server setupMail server setup
Mail server setup
Sreenatha Reddy K R
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setup
Sreenatha Reddy K R
 
Linux System Administration - NFS Server
Linux System Administration - NFS ServerLinux System Administration - NFS Server
Linux System Administration - NFS Server
Sreenatha Reddy K R
 
Linux System Administration - DNS
Linux System Administration - DNSLinux System Administration - DNS
Linux System Administration - DNS
Sreenatha Reddy K R
 
DHCP and NIS
DHCP and NISDHCP and NIS
DHCP and NIS
Sreenatha Reddy K R
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
Sreenatha Reddy K R
 

More from Sreenatha Reddy K R (8)

Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecases
 
Linux security firewall and SELinux
Linux security firewall and SELinuxLinux security firewall and SELinux
Linux security firewall and SELinux
 
Mail server setup
Mail server setupMail server setup
Mail server setup
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setup
 
Linux System Administration - NFS Server
Linux System Administration - NFS ServerLinux System Administration - NFS Server
Linux System Administration - NFS Server
 
Linux System Administration - DNS
Linux System Administration - DNSLinux System Administration - DNS
Linux System Administration - DNS
 
DHCP and NIS
DHCP and NISDHCP and NIS
DHCP and NIS
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
 

Recently uploaded

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

Linux commands and file structure

  • 1. Linux System Administration Linux Commands LINUX COMMANDS
  • 2. UNIX Commands Linux 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.
  • 3. UNIX Shell Linux Commands The shell sits between you and the operating system, acting as a command interpreter. It reads your terminal input and translates the commands into actions taken by the system. The shell is analogous to command.com in DOS. When you log into the system you are given a default shell. When the shell starts up it reads its startup files and may set environment variables, command search paths, and command aliases, and executes any commands specified in these files.
  • 4. UNIX Shell Linux Commands The original shell was the Bourne shell, sh. Every Unix platform will either have the Bourne shell, or a Bourne compatible shell available. The default prompt for the Bourne shell is $ (or #, for the root user). Another popular shell is C Shell. The default prompt for the C shell is %.
  • 5. UNIX Shell Linux Commands Numerous other shells are available from the network. Almost all of them are based on either sh or csh with extensions to provide job control to sh, allow in-line editing of commands, page through previously executed commands, provide command name completion and custom prompt, etc. Some of the more well known of these may be on your favorite Unix system: the Korn shell, ksh, by David Korn and the Bourne Again SHell, bash, from the Free Software Foundations GNU project, both based on sh, the T-C shell, tcsh, and the extended C shell, cshe, both based on csh.
  • 6. Shell Programming Linux Commands You can write shell programs by creating scripts containing a series of shell commands. The first line of the script should start with #! which indicates to the kernel that the script is directly executable. You immediately follow this with the name of the shell, or program (spaces are allowed), to execute, using the full path name. So to set up a Bourne shell script the first line would be: #! /bin/sh
  • 7. Shell Programming Linux Commands The first line is followed by commands Within the scripts # indicates a comment from that point until the end of the line, with #! being a special case if found as the first characters of the file. #!/bin/bash cd /tmp mkdir t You also need to specify that the script is executable by setting the proper bits on the file with chmod, e.g.: $ chmod +x shell_script
  • 8. LINUX COMMANDS Linux Commands File Management and Viewing Filesystem Mangement Help, Job and Process Management Network Management System Management User Management Printing and Programming Document Preparation Miscellaneous
  • 9. Command Structure Linux Commands Command <Options> <Arguments> Multiple commands separated by ; can be executed one after the other
  • 10. Help Facilities for Commands Linux Commands To understand the working of the command and possible options use (man command) Using the GNU Info System (info, info command) Listing a Description of a Program (whatis command) Many tools have a long−style option, `−−help', that outputs usage information about the tool, including the options and arguments the tool takes. Ex: whoami --help
  • 11. Pipes Linux Commands An important early development in Unix was the invention of "pipes," a way to pass the output of one tool to the input of another. eg. $ who | wc −l By combining these two tools, giving the wc command the output of who, you can build a new command to list the number of users currently on the system
  • 12. Linux File Management and Viewing Linux Commands File and Directory management cd Change the current directory. With no arguments "cd" changes to the users home directory. (cd <directory path>) chmod Change the file permissions. Ex: chmod 751 myfile : change the file permissions to rwx for owner, rx for group and x for others Ex: chmod go=+r myfile : Add read permission for the group and others (character meanings u-user, g-group, o- other, + add permission,-remove,r-read,w-write,x-exe) Ex: chmod +s myfile - Setuid bit on the file which allows the program to run with user or group privileges of the
  • 13. Linux File Management and Viewing Linux Commands There are three such special permissions within Linux. They are: setuid — used only for applications, this permission indicates that the application is to run as the owner of the file and not as the user executing the application. It is indicated by the character s in place of the x in the owner category. If the owner of the file does not have execute permissions, the S is capitalized to reflect this fact. setgid — used primarily for applications, this permission indicates that the application is to run as the group owning the file and not as the group of the user executing the application. The setgid permission is indicated by the character s in place of the x in the group category. If the group owner of the file or directory does not have execute permissions, the S is capitalized to reflect this fact. sticky bit — used primarily on directories, this bit dictates that a file created in the directory can be removed only by the user that created the file. It is indicated by the character t in place of the x in the everyone category. If the everyone category does not have execute permissions, the T is capitalized to reflect this fact.
  • 14. Linux File Management and Viewing Linux Commands chown Change owner. Ex: chown <owner1> <filename> : Change ownership of a file to owner1. chgrp Change group. Ex: chgrp <group1> <filename> : Change group of a file to group1. cp Copy a file from one location to another. Ex: cp file1 file2 : Copy file1 to file2 Ex: cp –R dir1 dir2 : Copy dir1 to dir2 md5sum Prints the MD5 Checksum
  • 15. Linux File Management and Viewing Linux Commands ls List contents of a directory. Ex: ls, ls –l , ls –al, ls –ld, ls –R (-rwxrwxr-x 1 juan juan 0 Sep 26 12:25 foo ) |more will list page wise mkdir Make a directory. Ex: mkdir <directory name> : Makes a directory Ex mkdir –p /www/chache/var/log will create all the directories starting from www. mv Move or rename a file or directory. Ex: mv <source> <destination>
  • 16. Linux File Management and Viewing Linux Commands find Find files (find <start directory> -name <file name> -print) Ex: find /home –name readme -print (Search for readme starting at home and output full path.) “/home" = Search starting at the home directory and proceed through all its subdirectories "-name readme" = Search for a file named readme "-print" = Output the full path to that file locate File locating program that uses the slocate database. Ex: locate –u to create the database,
  • 17. Linux File Management and Viewing Linux Commands pwd Print or list the present working directory with full path. rm Delete files (Remove files). (rm –rf <directory/file>) rmdir Remove a directory. The directory must be empty. (rmdir <directory>) touch Change file timestamps to the current time. Make the file if it doesn't exist. (touch <filename>) whereis Locate the binary and man page files for a command. (whereis <program/command>) which Show full path of commands where given commands reside. (which <command>)
  • 18. Linux File Management and Viewing Linux Commands File viewing and editing emacs Full screen editor. pico Simple text editor. vi Editor with a command mode and text mode. Starts in command mode. gedit GUI Text Editor tail Look at the last 10 lines of a file. Ex: tail –f <filename> , Ex: tail -100 <filename> head Look at the first 10 lines of a file. (head <filename>)
  • 19. Linux File Management and Viewing Linux Commands File compression, backing up and restoring compress Compress data. uncompress Expand data. cpio Can store files on tapes. to/from archives. gzip - zip a file to a gz file. gunzip - unzip a gz file. tar Archives files and directories. Can store files and directories on tapes. Ex: tar -zcvf <destination> <files/directories> - Archive copy groups of files. tar –zxvf <compressed file> to uncompress zip – Compresses a file to a .zip file. unzip – Uncompresses a file with .zip extension.
  • 20. Linux File Management and Viewing Linux Commands cat View a file Ex: cat filename cmp Compare two files. cut Remove sections from each line of files. diff Show the differences between files. Ex: diff file1 file2 : Find differences between file1 & file2. echo Display a line of text.
  • 21. Linux File Management and Viewing Linux Commands grep List all files with the specified expression. (grep pattern <filename/directorypath>) Ex: ls –l |grep sidbi : List all lines with a sidbi in them. Ex: grep " R " : Search for R with a space on each side sleep Delay for a specified amount of time. sort Sort a file alphabetically. uniq Remove duplicate lines from a sorted file. wc Count lines, words, characters in a file. (wc –c/w/l <filename>).
  • 22. Thank You Sreenatha Reddy K R krsreenatha@gmail.com