SlideShare a Scribd company logo
THE ONE PAGE LINUX MANUAL
A summary of useful Linux commands
Version 3.0 May 1999 squadron@powerup.com.au
Starting & Stopping
shutdown -h now Shutdown the system now and do not
reboot
halt Stop all processes - same as above
shutdown -r 5 Shutdown the system in 5 minutes and
reboot
shutdown -r now Shutdown the system now and reboot
reboot Stop all processes and then reboot - same
as above
startx Start the X system
Accessing & mounting file systems
mount -t iso9660 /dev/cdrom
/mnt/cdrom
Mount the device cdrom
and call it cdrom under the
/mnt directory
mount -t msdos /dev/hdd
/mnt/ddrive
Mount hard disk “d” as a
msdos file system and call
it ddrive under the /mnt
directory
mount -t vfat /dev/hda1
/mnt/cdrive
Mount hard disk “a” as a
VFAT file system and call it
cdrive under the /mnt
directory
umount /mnt/cdrom Unmount the cdrom
Finding files and text within files
find / -name fname Starting with the root directory, look
for the file called fname
find / -name ”*fname*” Starting with the root directory, look
for the file containing the string fname
locate missingfilename Find a file called missingfilename
using the locate command - this
assumes you have already used the
command updatedb (see next)
updatedb Create or update the database of files
on all file systems attached to the linux
root directory
which missingfilename Show the subdirectory containing the
executable file called missingfilename
grep textstringtofind
/dir
Starting with the directory called dir ,
look for and list all files containing
textstringtofind
The X Window System
xvidtune Run the X graphics tuning utility
XF86Setup Run the X configuration menu with
automatic probing of graphics cards
Xconfigurator Run another X configuration menu with
automatic probing of graphics cards
xf86config Run a text based X configuration menu
Moving, copying, deleting & viewing files
ls -l List files in current directory using
long format
ls -F List files in current directory and
indicate the file type
ls -laC List all files in current directory in
long format and display in columns
rm name Remove a file or directory called
name
rm -rf name Kill off an entire directory and all it’s
includes files and subdirectories
cp filename
/home/dirname
Copy the file called filename to the
/home/dirname directory
mv filename
/home/dirname
Move the file called filename to the
/home/dirname directory
cat filetoview Display the file called filetoview
man -k keyword Display man pages containing
keyword
more filetoview Display the file called filetoview one
page at a time, proceed to next page
using the spacebar
head filetoview Display the first 10 lines of the file
called filetoview
head -20 filetoview Display the first 20 lines of the file
called filetoview
tail filetoview Display the last 10 lines of the file
called filetoview
tail -20 filetoview Display the last 20 lines of the file
called filetoview
Installing software for Linux
rpm -ihv name.rpm Install the rpm package called name
rpm -Uhv name.rpm Upgrade the rpm package called
name
rpm -e package Delete the rpm package called
package
rpm -l package List the files in the package called
package
rpm -ql package List the files and state the installed
version of the package called
package
rpm -i --force package Reinstall the rpm package called
name having deleted parts of it (not
deleting using rpm -e)
tar -zxvf archive.tar.gz or
tar -zxvf archive.tgz
Decompress the files contained in
the zipped and tarred archive called
archive
./configure Execute the script preparing the
installed files for compiling
User Administration
adduser accountname Create a new user call accountname
passwd accountname Give accountname a new password
su Log in as superuser from current login
exit Stop being superuser and revert to
normal user
Little known tips and tricks
ifconfig List ip addresses for all devices on
the machine
apropos subject List manual pages for subject
usermount Executes graphical application for
mounting and unmounting file
systems
/sbin/e2fsck hda5 Execute the filesystem check utility
on partition hda5
fdformat /dev/fd0H1440 Format the floppy disk in device fd0
tar -cMf /dev/fd0 Backup the contents of the current
directory and subdirectories to
multiple floppy disks
tail -f /var/log/messages Display the last 10 lines of the system
log.
cat /var/log/dmesg Display the file containing the boot
time messages - useful for locating
problems. Alternatively, use the
dmesg command.
* wildcard - represents everything. eg.
cp from/* to will copy all files in the
from directory to the to directory
? Single character wildcard. eg.
cp config.? /configs will copy all files
beginning with the name config. in
the current directory to the directory
named configs.
[xyz] Choice of character wildcards. eg.
ls [xyz]* will list all files in the current
directory starting with the letter x, y,
or z.
linux single At the lilo prompt, start in single user
mode. This is useful if you have
forgotten your password. Boot in
single user mode, then run the
passwd command.
ps List current processes
kill 123 Kill a specific process eg. kill 123
Configuration files and what they do
/etc/profile System wide environment variables for
all users.
/etc/fstab List of devices and their associated mount
points. Edit this file to add cdroms, DOS
partitions and floppy drives at startup.
/etc/motd Message of the day broadcast to all users
at login.
etc/rc.d/rc.local Bash script that is executed at the end of
login process. Similar to autoexec.bat in
DOS.
/etc/HOSTNAME Conatins full hostname including domain.
/etc/cron.* There are 4 directories that automatically
execute all scripts within the directory at
intervals of hour, day, week or month.
/etc/hosts A list of all know host names and IP
addresses on the machine.
/etc/httpd/conf Paramters for the Apache web server
/etc/inittab Specifies the run level that the machine
should boot into.
/etc/resolv.conf Defines IP addresses of DNS servers.
/etc/smb.conf Config file for the SAMBA server. Allows
file and print sharing with Microsoft
clients.
/etc/X11/XF86Confi
g
Config file for X-Windows.
~/.xinitrc Defines the windows manager loaded by
X. ~ refers to user’s home directory.
File permissions
If the command ls -l is given, a long list of file names is
displayed. The first column in this list details the permissions
applying to the file. If a permission is missing for a owner,
group of other, it is represented by - eg. drwxr-x—x
Read = 4
Write = 2
Execute = 1
File permissions are altered by giving the
chmod command and the appropriate
octal code for each user type. eg
chmod 7 6 4 filename will make the file
called filename R+W+X for the owner,
R+W for the group and R for others.
chmod 7 5 5 Full permission for the owner, read and
execute access for the group and others.
chmod +x filename Make the file called filename executable
to all users.
X Shortcuts - (mainly for Redhat)
Control|Alt + or - Increase or decrease the screen
resolution. eg. from 640x480 to
800x600
Alt | escape Display list of active windows
Shift|Control F8 Resize the selected window
Right click on desktop
background
Display menu
Shift|Control Altr Refresh the screen
Shift|Control Altx Start an xterm session
Printing
/etc/rc.d/init.d/lpd start Start the print daemon
/etc/rc.d/init.d/lpd stop Stop the print daemon
/etc/rc.d/init.d/lpd
status
Display status of the print daemon
lpq Display jobs in print queue
lprm Remove jobs from queue
lpr Print a file
lpc Printer control tool
man subject | lpr Print the manual page called subject
as plain text
man -t subject | lpr Print the manual page called subject
as Postscript output
printtool Start X printer setup interface
~/.Xdefaults Define configuration for some X-
applications. ~ refers to user’s home
directory.
Get your own Official Linux Pocket Protector - includes
handy command summary. Visit:
www.powerup.com.au/~squadron

More Related Content

What's hot (20)

PDF
Basic linux commands
Raghav Arora
 
PDF
Linux Basic Commands
Hanan Nmr
 
PPT
1.2 boot the system v2
Acácio Oliveira
 
PPTX
Know the UNIX Commands
Brahma Killampalli
 
PPT
Raj linux
firstplanet
 
PPTX
Compression
aswathyu
 
PPTX
An Introduction to Linux
Dimas Prasetyo
 
PDF
Linux class 8 tar
Khawar Nehal [email protected]
 
PPTX
Basic commands of linux
shravan saini
 
PDF
Basic commands
ambilivava
 
PPT
Linux commands and file structure
Sreenatha Reddy K R
 
PPT
Introduction to Unix
Sudharsan S
 
PPT
Linux basic commands
MohanKumar Palanichamy
 
PPT
Unix(introduction)
meashi
 
PPT
Linux commands
Radheshyam Kori
 
PDF
Linux basic commands with examples
abclearnn
 
PDF
Basic linux commands for bioinformatics
Bonnie Ng
 
PPT
Linuxppt
TSUBHASHRI
 
PPT
Common linux ubuntu commands overview
Ameer Sameer
 
PDF
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
Basic linux commands
Raghav Arora
 
Linux Basic Commands
Hanan Nmr
 
1.2 boot the system v2
Acácio Oliveira
 
Know the UNIX Commands
Brahma Killampalli
 
Raj linux
firstplanet
 
Compression
aswathyu
 
An Introduction to Linux
Dimas Prasetyo
 
Basic commands of linux
shravan saini
 
Basic commands
ambilivava
 
Linux commands and file structure
Sreenatha Reddy K R
 
Introduction to Unix
Sudharsan S
 
Linux basic commands
MohanKumar Palanichamy
 
Unix(introduction)
meashi
 
Linux commands
Radheshyam Kori
 
Linux basic commands with examples
abclearnn
 
Basic linux commands for bioinformatics
Bonnie Ng
 
Linuxppt
TSUBHASHRI
 
Common linux ubuntu commands overview
Ameer Sameer
 
Quick Guide with Linux Command Line
Anuchit Chalothorn
 

Similar to The one page linux manual (20)

ODP
Sahul
sahul azzez m.i
 
ODP
Sahul
sahul azzez m.i
 
PPT
Linux
Hema Prasanth
 
PDF
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
DOC
Linux Shortcuts and Commands:
wensheng wei
 
PPT
Divya
diva23
 
PPT
Divya
diva23
 
PDF
Basic linux commands
Nguyen Vinh
 
PPT
Linux
Kavi Bharathi R
 
PPTX
Linux training
artisriva
 
DOCX
Basic linux commands
Dheeraj Nambiar
 
PDF
Linux commands cheat sheet by linoxide.com
Stavros Skamagkis
 
ODT
Terminal linux commands_ Fedora based
Navin Thapa
 
PDF
3.1.a linux commands reference
Acácio Oliveira
 
DOCX
List command linux fidora
Jinyuan Loh
 
PPT
Linux
Rathan Raj
 
PPT
Linux
Gouthaman V
 
DOCX
Linux basic commands
Teja Bheemanapally
 
PPT
Linux ppt
Sanmuga Nathan
 
PPTX
Linux Presentation
Muhammad Qazi
 
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Linux Shortcuts and Commands:
wensheng wei
 
Divya
diva23
 
Divya
diva23
 
Basic linux commands
Nguyen Vinh
 
Linux training
artisriva
 
Basic linux commands
Dheeraj Nambiar
 
Linux commands cheat sheet by linoxide.com
Stavros Skamagkis
 
Terminal linux commands_ Fedora based
Navin Thapa
 
3.1.a linux commands reference
Acácio Oliveira
 
List command linux fidora
Jinyuan Loh
 
Linux
Rathan Raj
 
Linux basic commands
Teja Bheemanapally
 
Linux ppt
Sanmuga Nathan
 
Linux Presentation
Muhammad Qazi
 
Ad

Recently uploaded (20)

PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
PPTX
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PDF
John Keats introduction and list of his important works
vatsalacpr
 
PPTX
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PPTX
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
John Keats introduction and list of his important works
vatsalacpr
 
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Ad

The one page linux manual

  • 1. THE ONE PAGE LINUX MANUAL A summary of useful Linux commands Version 3.0 May 1999 [email protected] Starting & Stopping shutdown -h now Shutdown the system now and do not reboot halt Stop all processes - same as above shutdown -r 5 Shutdown the system in 5 minutes and reboot shutdown -r now Shutdown the system now and reboot reboot Stop all processes and then reboot - same as above startx Start the X system Accessing & mounting file systems mount -t iso9660 /dev/cdrom /mnt/cdrom Mount the device cdrom and call it cdrom under the /mnt directory mount -t msdos /dev/hdd /mnt/ddrive Mount hard disk “d” as a msdos file system and call it ddrive under the /mnt directory mount -t vfat /dev/hda1 /mnt/cdrive Mount hard disk “a” as a VFAT file system and call it cdrive under the /mnt directory umount /mnt/cdrom Unmount the cdrom Finding files and text within files find / -name fname Starting with the root directory, look for the file called fname find / -name ”*fname*” Starting with the root directory, look for the file containing the string fname locate missingfilename Find a file called missingfilename using the locate command - this assumes you have already used the command updatedb (see next) updatedb Create or update the database of files on all file systems attached to the linux root directory which missingfilename Show the subdirectory containing the executable file called missingfilename grep textstringtofind /dir Starting with the directory called dir , look for and list all files containing textstringtofind The X Window System xvidtune Run the X graphics tuning utility XF86Setup Run the X configuration menu with automatic probing of graphics cards Xconfigurator Run another X configuration menu with automatic probing of graphics cards xf86config Run a text based X configuration menu Moving, copying, deleting & viewing files ls -l List files in current directory using long format ls -F List files in current directory and indicate the file type ls -laC List all files in current directory in long format and display in columns rm name Remove a file or directory called name rm -rf name Kill off an entire directory and all it’s includes files and subdirectories cp filename /home/dirname Copy the file called filename to the /home/dirname directory mv filename /home/dirname Move the file called filename to the /home/dirname directory cat filetoview Display the file called filetoview man -k keyword Display man pages containing keyword more filetoview Display the file called filetoview one page at a time, proceed to next page using the spacebar head filetoview Display the first 10 lines of the file called filetoview head -20 filetoview Display the first 20 lines of the file called filetoview tail filetoview Display the last 10 lines of the file called filetoview tail -20 filetoview Display the last 20 lines of the file called filetoview Installing software for Linux rpm -ihv name.rpm Install the rpm package called name rpm -Uhv name.rpm Upgrade the rpm package called name rpm -e package Delete the rpm package called package rpm -l package List the files in the package called package rpm -ql package List the files and state the installed version of the package called package rpm -i --force package Reinstall the rpm package called name having deleted parts of it (not deleting using rpm -e) tar -zxvf archive.tar.gz or tar -zxvf archive.tgz Decompress the files contained in the zipped and tarred archive called archive ./configure Execute the script preparing the installed files for compiling User Administration adduser accountname Create a new user call accountname passwd accountname Give accountname a new password su Log in as superuser from current login exit Stop being superuser and revert to normal user Little known tips and tricks ifconfig List ip addresses for all devices on the machine apropos subject List manual pages for subject usermount Executes graphical application for mounting and unmounting file systems
  • 2. /sbin/e2fsck hda5 Execute the filesystem check utility on partition hda5 fdformat /dev/fd0H1440 Format the floppy disk in device fd0 tar -cMf /dev/fd0 Backup the contents of the current directory and subdirectories to multiple floppy disks tail -f /var/log/messages Display the last 10 lines of the system log. cat /var/log/dmesg Display the file containing the boot time messages - useful for locating problems. Alternatively, use the dmesg command. * wildcard - represents everything. eg. cp from/* to will copy all files in the from directory to the to directory ? Single character wildcard. eg. cp config.? /configs will copy all files beginning with the name config. in the current directory to the directory named configs. [xyz] Choice of character wildcards. eg. ls [xyz]* will list all files in the current directory starting with the letter x, y, or z. linux single At the lilo prompt, start in single user mode. This is useful if you have forgotten your password. Boot in single user mode, then run the passwd command. ps List current processes kill 123 Kill a specific process eg. kill 123 Configuration files and what they do /etc/profile System wide environment variables for all users. /etc/fstab List of devices and their associated mount points. Edit this file to add cdroms, DOS partitions and floppy drives at startup. /etc/motd Message of the day broadcast to all users at login. etc/rc.d/rc.local Bash script that is executed at the end of login process. Similar to autoexec.bat in DOS. /etc/HOSTNAME Conatins full hostname including domain. /etc/cron.* There are 4 directories that automatically execute all scripts within the directory at intervals of hour, day, week or month. /etc/hosts A list of all know host names and IP addresses on the machine. /etc/httpd/conf Paramters for the Apache web server /etc/inittab Specifies the run level that the machine should boot into. /etc/resolv.conf Defines IP addresses of DNS servers. /etc/smb.conf Config file for the SAMBA server. Allows file and print sharing with Microsoft clients. /etc/X11/XF86Confi g Config file for X-Windows. ~/.xinitrc Defines the windows manager loaded by X. ~ refers to user’s home directory. File permissions If the command ls -l is given, a long list of file names is displayed. The first column in this list details the permissions applying to the file. If a permission is missing for a owner, group of other, it is represented by - eg. drwxr-x—x Read = 4 Write = 2 Execute = 1 File permissions are altered by giving the chmod command and the appropriate octal code for each user type. eg chmod 7 6 4 filename will make the file called filename R+W+X for the owner, R+W for the group and R for others. chmod 7 5 5 Full permission for the owner, read and execute access for the group and others. chmod +x filename Make the file called filename executable to all users. X Shortcuts - (mainly for Redhat) Control|Alt + or - Increase or decrease the screen resolution. eg. from 640x480 to 800x600 Alt | escape Display list of active windows Shift|Control F8 Resize the selected window Right click on desktop background Display menu Shift|Control Altr Refresh the screen Shift|Control Altx Start an xterm session Printing /etc/rc.d/init.d/lpd start Start the print daemon /etc/rc.d/init.d/lpd stop Stop the print daemon /etc/rc.d/init.d/lpd status Display status of the print daemon lpq Display jobs in print queue lprm Remove jobs from queue lpr Print a file lpc Printer control tool man subject | lpr Print the manual page called subject as plain text man -t subject | lpr Print the manual page called subject as Postscript output printtool Start X printer setup interface ~/.Xdefaults Define configuration for some X- applications. ~ refers to user’s home directory. Get your own Official Linux Pocket Protector - includes handy command summary. Visit: www.powerup.com.au/~squadron