際際滷

際際滷Share a Scribd company logo
As with Windows 95 and other operating systems, if you want to use
them you must be able to navigate the file system. The best and fastest
way to do this in Linux is through the use of commands.
I have decided that I wont get into a detailed discussion of the various
major directories and subdirectories that comprise the Linux filesystem
because:
1. I cant be bothered and I have better things to do.
2. By typing the command "xfm &" in an xterm window, one can
view, conceptualise and navigate a graphical representation of the
Linux filesystem. Note: You can also type the command "git" in
an xterm for a non-graphical view.
It is important for fellow Newbies to note that the top of your filesystem
or "root" is characterised by a "backslash" /. All other directories
branch off the root directory. Therefore what you do in root is very important to the welfare of your
system and your nerves - especially when recursively deleting files and directories.
Finally, The Commands
Note: For more Information see the manual pages on local system (man), the
Linux How-Tos or Try here.
Also note: Linux commands are case sensitive
Basic File Manipulation
Command Function
cd [/usr] Change to /usr directory
ls [allansthings] List contents of directory allansthings
ls -l List contents of current directory in vertical format
ls -la List contents of current directory in detailed format ie. every file,
permissions etc.
ls -S Lists files based on their size
ls -R Lists all directories and their contents below that where the
command was effected
cp [bad /root/good] copy bad to good directory
cp bad/* good Copy entire contents of bad directory to good.
cp * ../ root Copy all files in current directory to parent directory
rm [bad] delete file bad
rm * Removes all files in current directory
rm -r Remove files in all subdirectories where command was issued
rm -r * Remove files and directories
rm -rf [neurosis] To force delete. BEWARE when using on root (/) directory.
rmdir [bad] Remove directory bad (must be empty)
mkdir [good] Make directory named good
mv [bad] [good] Rename file or directory bad to good
mv [terrible] [great] Move file or directory terrible to file or directory great
(Rename & Move same under Linux)
usermount
Loads the usermount tool, a program used to mount / unmount
devices.
(un)mount mounts / unmounts a device eg. "mount floppy"
mount -t iso9660
/dev/cdrom /mnt/cdrom
Command used to mount CD-ROM; alternatively use the
usermount tool.
mount -t vfat /dev/hda1
/mnt/cdrive
Command used to mount a Windows partition (assuming it is the
first or only partition on C Drive - which is hda1) . Alternatively,
use the usermount tool but you will probably have to add the
windows partition to it via the Linux-configuration tool
(linuxconf).
head [inflow] Output beginning of file named inflow
tail [outflow] Output end of file named outflow
cat [mouse] View the contents of file named mouse
cat [f4 f8] > [f9] Concatenates file 4 and file 8 into file 9
less [money] Lists contents of file named money a screen of data at a time
(similar to more command above)
more [money] Lists contents of file named money by screen
emacs [money] Loads contents of file money in Emacs editor
vi [money] loads contents of file money in Vi editor
Basic System Commands
Command Function
startx Loads X Window GUI
shutdown -h now Shutsdown and halts the system
shutdown -r now Shutsdown and reboots the system
exit exits from xterm
man Linux manual eg. man ls will outline options related to ls
command
linuxconf Loads the Linux-configuration tool, from where one can
configure many aspects of the system.
netconf Loads the Network Configurator which enables one to configure
Network Connectivity eg. PPP / Internet
netcfg & Use this tool to dial your ISP (select interface tab and activate
button. Can also be used to configure an internet connection)
adduser Add a new user to the system eg. adduser allan
passwd Set password eg. passwd allan
df Lists amount of free space in each partition
control-panel & Loads the Control Panel tool
xfm & Loads graphical file management tool
Ctrl z Suspend current process
Ctrl s Stop screen scrolling
Ctrl q Resume screen scrolling
find Search for file eg. find / -name lilo.conf
locate Search (see man locate)
whereis Search eg. whereis .netscape
glint Loads graphical program indicating installed rpm applications
and their details. Also useful for installing rpm applications.
rpm -i [filename] Install rpm applications (see man rpm)
rpm -e [filename] Uninstall rpm package (see man rpm)
rpm -q [filename] Query whether package is installed on system
tar -zxvf [filename] Unzips and extracts program in .tar.gz format
printtool loads "Red Hats" printer configuration program.
cat [filename] > /dev/lp Send a file to be printed directly to the printer (root user / group
only).
lpr [filename] Prints a file.
lpq View contents of a print queue.
lprm - Cancel all print jobs (lprm 15 will cancel print job 15)
git file system viewer
The Linux Webring: [ Previous | Next | Home | Random |
List ]
[ Home ] [ Linuxbabble ] [ Getting Started ] [ Basic Linux Commands ] [ Mounting Things ]
[ Useful Links ]

More Related Content

What's hot (13)

Linux commands
Linux commandsLinux commands
Linux commands
Radheshyam Kori
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
Linux Security Quick Reference Guide
Linux Security Quick Reference GuideLinux Security Quick Reference Guide
Linux Security Quick Reference Guide
wensheng wei
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
Linux commands
Linux commandsLinux commands
Linux commands
Ajaigururaj R
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
Rodrigo Maia
Gnome terminal basics
Gnome terminal basicsGnome terminal basics
Gnome terminal basics
Kamrul Hasan
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
BASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUXBASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUX
Mr.AKHILESH KUMAR {Computer Lab Technician}
Linux
LinuxLinux
Linux
Ankush Jain
Linux commands
Linux commandsLinux commands
Linux commands
Hemakumar.S
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
Kanchilug
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
Linux Security Quick Reference Guide
Linux Security Quick Reference GuideLinux Security Quick Reference Guide
Linux Security Quick Reference Guide
wensheng wei
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
Rodrigo Maia
Gnome terminal basics
Gnome terminal basicsGnome terminal basics
Gnome terminal basics
Kamrul Hasan
Linux commands
Linux commandsLinux commands
Linux commands
Hemakumar.S
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
Kanchilug

Viewers also liked (20)

Basic commands (linux)
Basic commands (linux)Basic commands (linux)
Basic commands (linux)
Faysal Khan
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Akkamahadevi Gowda
Introduction to Ubuntu
Introduction to UbuntuIntroduction to Ubuntu
Introduction to Ubuntu
Alex Mikitenko
MS Word Intermediate Training
MS Word Intermediate TrainingMS Word Intermediate Training
MS Word Intermediate Training
Michael Sheyahshe
Get Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic KnowledgeGet Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic Knowledge
David Clark
Soalan bab 6
Soalan bab 6Soalan bab 6
Soalan bab 6
Aten Kecik
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
亳从仂仍舒亶 仂仍亟仂于从亳亶
Ms excel training
Ms excel training   Ms excel training
Ms excel training
Jensen Group
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
Lecture 6 microsoft office excel 2007
Lecture 6 microsoft office excel 2007Lecture 6 microsoft office excel 2007
Lecture 6 microsoft office excel 2007
soyoltsetsegs
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
Operating Systems
Operating SystemsOperating Systems
Operating Systems
Dasun Hegoda
MS Word Basics Training
MS Word Basics TrainingMS Word Basics Training
MS Word Basics Training
Michael Sheyahshe
Ms word 2013 Training
Ms word 2013 TrainingMs word 2013 Training
Ms word 2013 Training
Jahnavee Parmar
All ms word 2013
All ms word 2013All ms word 2013
All ms word 2013
Ashan Dissanayake
Comparison of windows linux and mac os
Comparison of windows linux and mac osComparison of windows linux and mac os
Comparison of windows linux and mac os
Ali Zar
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
mufassirin
Segmentation module 4 mba 1st sem by babasab patil (karrisatte)
Segmentation module 4  mba 1st sem by babasab patil (karrisatte)Segmentation module 4  mba 1st sem by babasab patil (karrisatte)
Segmentation module 4 mba 1st sem by babasab patil (karrisatte)
Babasab Patil
Chapter 1-introduction to ict
Chapter 1-introduction to ictChapter 1-introduction to ict
Chapter 1-introduction to ict
Aten Kecik
Basic commands (linux)
Basic commands (linux)Basic commands (linux)
Basic commands (linux)
Faysal Khan
Introduction to Ubuntu
Introduction to UbuntuIntroduction to Ubuntu
Introduction to Ubuntu
Alex Mikitenko
MS Word Intermediate Training
MS Word Intermediate TrainingMS Word Intermediate Training
MS Word Intermediate Training
Michael Sheyahshe
Get Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic KnowledgeGet Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic Knowledge
David Clark
Soalan bab 6
Soalan bab 6Soalan bab 6
Soalan bab 6
Aten Kecik
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
MS Word 2013 仂 仆仂于亳从舒 亟仂 仗仂亠亳仂仆舒仍舒. 舒仆亳亠 1. 亠亟舒于仍亠仆亳亠 MS Word 2013
亳从仂仍舒亶 仂仍亟仂于从亳亶
Ms excel training
Ms excel training   Ms excel training
Ms excel training
Jensen Group
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
Lecture 6 microsoft office excel 2007
Lecture 6 microsoft office excel 2007Lecture 6 microsoft office excel 2007
Lecture 6 microsoft office excel 2007
soyoltsetsegs
Operating Systems
Operating SystemsOperating Systems
Operating Systems
Dasun Hegoda
Ms word 2013 Training
Ms word 2013 TrainingMs word 2013 Training
Ms word 2013 Training
Jahnavee Parmar
Comparison of windows linux and mac os
Comparison of windows linux and mac osComparison of windows linux and mac os
Comparison of windows linux and mac os
Ali Zar
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
mufassirin
Segmentation module 4 mba 1st sem by babasab patil (karrisatte)
Segmentation module 4  mba 1st sem by babasab patil (karrisatte)Segmentation module 4  mba 1st sem by babasab patil (karrisatte)
Segmentation module 4 mba 1st sem by babasab patil (karrisatte)
Babasab Patil
Chapter 1-introduction to ict
Chapter 1-introduction to ictChapter 1-introduction to ict
Chapter 1-introduction to ict
Aten Kecik

Similar to Basic linux commands (20)

The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Saikat Rakshit
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Craig Cannon
Linux
Linux Linux
Linux
Hema Prasanth
Sahul
SahulSahul
Sahul
sahul azzez m.i
Sahul
SahulSahul
Sahul
sahul azzez m.i
Examples -partII
Examples -partIIExamples -partII
Examples -partII
Kedar Bhandari
Divya
DivyaDivya
Divya
diva23
Divya
DivyaDivya
Divya
diva23
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
LinuxLinux
Linux
Rathan Raj
lec1.docx
lec1.docxlec1.docx
lec1.docx
ismailaboshatra
Termux commands-list
Termux commands-listTermux commands-list
Termux commands-list
DhanushR24
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
OS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topicsOS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topics
JithinS34
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
Teja Bheemanapally
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
Teja Bheemanapally
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
Ameer Sameer
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
Linux
LinuxLinux
Linux
Srinivas Reddy
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Saikat Rakshit
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Craig Cannon
Divya
DivyaDivya
Divya
diva23
Divya
DivyaDivya
Divya
diva23
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
Termux commands-list
Termux commands-listTermux commands-list
Termux commands-list
DhanushR24
OS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topicsOS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topics
JithinS34
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
Teja Bheemanapally
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
Teja Bheemanapally
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
Ameer Sameer

Basic linux commands

  • 1. As with Windows 95 and other operating systems, if you want to use them you must be able to navigate the file system. The best and fastest way to do this in Linux is through the use of commands. I have decided that I wont get into a detailed discussion of the various major directories and subdirectories that comprise the Linux filesystem because: 1. I cant be bothered and I have better things to do. 2. By typing the command "xfm &" in an xterm window, one can view, conceptualise and navigate a graphical representation of the Linux filesystem. Note: You can also type the command "git" in an xterm for a non-graphical view. It is important for fellow Newbies to note that the top of your filesystem or "root" is characterised by a "backslash" /. All other directories branch off the root directory. Therefore what you do in root is very important to the welfare of your system and your nerves - especially when recursively deleting files and directories. Finally, The Commands Note: For more Information see the manual pages on local system (man), the Linux How-Tos or Try here. Also note: Linux commands are case sensitive
  • 2. Basic File Manipulation Command Function cd [/usr] Change to /usr directory ls [allansthings] List contents of directory allansthings ls -l List contents of current directory in vertical format ls -la List contents of current directory in detailed format ie. every file, permissions etc. ls -S Lists files based on their size ls -R Lists all directories and their contents below that where the command was effected cp [bad /root/good] copy bad to good directory cp bad/* good Copy entire contents of bad directory to good. cp * ../ root Copy all files in current directory to parent directory rm [bad] delete file bad rm * Removes all files in current directory rm -r Remove files in all subdirectories where command was issued rm -r * Remove files and directories rm -rf [neurosis] To force delete. BEWARE when using on root (/) directory. rmdir [bad] Remove directory bad (must be empty) mkdir [good] Make directory named good mv [bad] [good] Rename file or directory bad to good mv [terrible] [great] Move file or directory terrible to file or directory great (Rename & Move same under Linux) usermount Loads the usermount tool, a program used to mount / unmount devices. (un)mount mounts / unmounts a device eg. "mount floppy" mount -t iso9660 /dev/cdrom /mnt/cdrom Command used to mount CD-ROM; alternatively use the usermount tool. mount -t vfat /dev/hda1 /mnt/cdrive Command used to mount a Windows partition (assuming it is the first or only partition on C Drive - which is hda1) . Alternatively,
  • 3. use the usermount tool but you will probably have to add the windows partition to it via the Linux-configuration tool (linuxconf). head [inflow] Output beginning of file named inflow tail [outflow] Output end of file named outflow cat [mouse] View the contents of file named mouse cat [f4 f8] > [f9] Concatenates file 4 and file 8 into file 9 less [money] Lists contents of file named money a screen of data at a time (similar to more command above) more [money] Lists contents of file named money by screen emacs [money] Loads contents of file money in Emacs editor vi [money] loads contents of file money in Vi editor Basic System Commands Command Function startx Loads X Window GUI shutdown -h now Shutsdown and halts the system shutdown -r now Shutsdown and reboots the system exit exits from xterm man Linux manual eg. man ls will outline options related to ls command linuxconf Loads the Linux-configuration tool, from where one can configure many aspects of the system. netconf Loads the Network Configurator which enables one to configure Network Connectivity eg. PPP / Internet netcfg & Use this tool to dial your ISP (select interface tab and activate button. Can also be used to configure an internet connection) adduser Add a new user to the system eg. adduser allan passwd Set password eg. passwd allan
  • 4. df Lists amount of free space in each partition control-panel & Loads the Control Panel tool xfm & Loads graphical file management tool Ctrl z Suspend current process Ctrl s Stop screen scrolling Ctrl q Resume screen scrolling find Search for file eg. find / -name lilo.conf locate Search (see man locate) whereis Search eg. whereis .netscape glint Loads graphical program indicating installed rpm applications and their details. Also useful for installing rpm applications. rpm -i [filename] Install rpm applications (see man rpm) rpm -e [filename] Uninstall rpm package (see man rpm) rpm -q [filename] Query whether package is installed on system tar -zxvf [filename] Unzips and extracts program in .tar.gz format printtool loads "Red Hats" printer configuration program. cat [filename] > /dev/lp Send a file to be printed directly to the printer (root user / group only). lpr [filename] Prints a file. lpq View contents of a print queue. lprm - Cancel all print jobs (lprm 15 will cancel print job 15) git file system viewer The Linux Webring: [ Previous | Next | Home | Random | List ] [ Home ] [ Linuxbabble ] [ Getting Started ] [ Basic Linux Commands ] [ Mounting Things ] [ Useful Links ]