SlideShare a Scribd company logo
1 of 2
Download to read offline
THE ONE PAGE LINUX MANUAL
                                      A summary of useful Linux commands
 Version 3.0                                             May 1999                          squadron@powerup.com.au

                                                                         rm name                        Remove a file or directory called
                                                                                                        name
Starting & Stopping
                                                                                                        Kill off an entire directory and all it’s
                                                                         rm -rf name
                                                                                                        includes files and subdirectories
 shutdown -h now          Shutdown the system now and do not
                          reboot                                         cp filename                    Copy the file called filename to the
                                                                         /home/dirname                  /home/dirname directory
 halt                     Stop all processes - same as above
 shutdown -r 5            Shutdown the system in 5 minutes and
                                                                         mv filename                    Move the file called filename to the
                          reboot
                                                                         /home/dirname                  /home/dirname directory
 shutdown -r now          Shutdown the system now and reboot
 reboot                   Stop all processes and then reboot - same
                                                                         cat filetoview                 Display the file called filetoview
                          as above
                                                                                                        Display man pages containing
                                                                         man -k keyword
 startx                   Start the X system
                                                                                                        keyword
                                                                         more filetoview                Display the file called filetoview one
Accessing & mounting file systems                                                                       page at a time, proceed to next page
                                                                                                        using the spacebar
 mount -t iso9660 /dev/cdrom              Mount the device cdrom         head filetoview                Display the first 10 lines of the file
                                          and call it cdrom under the
 /mnt/cdrom                                                                                             called filetoview
                                          /mnt directory
                                                                         head -20 filetoview            Display the first 20 lines of the file
 mount -t msdos /dev/hdd                  Mount hard disk “d” as a                                      called filetoview
                                          msdos file system and call
 /mnt/ddrive
                                                                         tail filetoview                Display the last 10 lines of the file
                                          it ddrive under the /mnt
                                                                                                        called filetoview
                                          directory
                                                                         tail -20 filetoview            Display the last 20 lines of the file
 mount -t vfat /dev/hda1                  Mount hard disk “a” as a
                                                                                                        called filetoview
                                          VFAT file system and call it
 /mnt/cdrive
                                          cdrive under the /mnt
                                          directory                      Installing software for Linux
 umount /mnt/cdrom                        Unmount the cdrom
                                                                         rpm -ihv name.rpm               Install the rpm package called name
Finding files and text within files                                      rpm -Uhv name.rpm               Upgrade the rpm package called
                                                                                                         name
 find / -name fname          Starting with the root directory, look
                                                                         rpm -e package                  Delete the rpm package called
                             for the file called fname                                                   package
 find / -name ”*fname*”      Starting with the root directory, look
                                                                         rpm -l package                  List the files in the package called
                             for the file containing the string fname                                    package
 locate missingfilename      Find a file called missingfilename
                                                                         rpm -ql package                 List the files and state the installed
                             using the locate command - this                                             version of the package called
                             assumes you have already used the                                           package
                             command updatedb (see next)
                                                                                                         Reinstall the rpm package called
                                                                         rpm -i --force package
 updatedb                    Create or update the database of files                                      name having deleted parts of it (not
                             on all file systems attached to the linux                                   deleting using rpm -e)
                             root directory
                                                                                                         Decompress the files contained in
                                                                         tar -zxvf archive.tar.gz or
 which missingfilename       Show the subdirectory containing the                                        the zipped and tarred archive called
                                                                         tar -zxvf archive.tgz
                             executable file called missingfilename                                      archive
 grep textstringtofind       Starting with the directory called dir ,    ./configure                     Execute the script preparing the
 /dir                        look for and list all files containing                                      installed files for compiling
                             textstringtofind

                                                                         User Administration
The X Window System
                                                                         adduser accountname           Create a new user call accountname
 xvidtune                Run the X graphics tuning utility
                                                                         passwd accountname            Give accountname a new password
 XF86Setup               Run the X configuration menu with
                                                                         su                            Log in as superuser from current login
                         automatic probing of graphics cards
                                                                         exit                          Stop being superuser and revert to
 Xconfigurator           Run another X configuration menu with
                                                                                                       normal user
                         automatic probing of graphics cards
 xf86config              Run a text based X configuration menu

                                                                         Little known tips and tricks
Moving, copying, deleting & viewing files
                                                                         ifconfig                       List ip addresses for all devices on
 ls -l                         List files in current directory using
                                                                                                        the machine
                               long format
                                                                         apropos subject                List manual pages for subject
                               List files in current directory and
 ls -F
                               indicate the file type                    usermount                      Executes graphical application for
                                                                                                        mounting and unmounting file
                               List all files in current directory in
 ls -laC
                                                                                                        systems
                               long format and display in columns
/sbin/e2fsck hda5            Execute the filesystem check utility
                                                                            File permissions
                             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
                             Display the last 10 lines of the system
tail -f /var/log/messages
                             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
                                                                            If the command ls -l is given, a long list of file names is
                             the current directory to the directory
                                                                            displayed. The first column in this list details the permissions
                             named configs.
                                                                            applying to the file. If a permission is missing for a owner,
[xyz]                        Choice of character wildcards. eg.
                                                                            group of other, it is represented by - eg. drwxr-x—x
                             ls [xyz]* will list all files in the current
                                                                            Read = 4                     File permissions are altered by giving the
                             directory starting with the letter x, y,
                                                                                                         chmod command and the appropriate
                                                                            Write = 2
                             or z.
                                                                                                         octal code for each user type. eg
                                                                            Execute = 1
linux single                 At the lilo prompt, start in single user
                                                                                                         chmod 7 6 4 filename will make the file
                             mode. This is useful if you have
                                                                                                         called filename R+W+X for the owner,
                             forgotten your password. Boot in
                                                                                                         R+W for the group and R for others.
                             single user mode, then run the
                                                                            chmod 7 5 5                  Full permission for the owner, read and
                             passwd command.
                                                                                                         execute access for the group and others.
ps                           List current processes
                                                                            chmod +x filename            Make the file called filename executable
kill 123                     Kill a specific process eg. kill 123
                                                                                                         to all users.

Configuration files and what they do                                        X Shortcuts - (mainly for Redhat)
/etc/profile             System wide environment variables for
                                                                            Control|Alt + or -                      Increase or decrease the screen
                         all users.
                                                                                                                    resolution. eg. from 640x480 to
/etc/fstab               List of devices and their associated mount                                                 800x600
                         points. Edit this file to add cdroms, DOS
                                                                            Alt | escape                            Display list of active windows
                         partitions and floppy drives at startup.
                                                                            Shift|Control F8                        Resize the selected window
/etc/motd                Message of the day broadcast to all users
                                                                            Right click on desktop                  Display menu
                         at login.
                                                                            background
etc/rc.d/rc.local        Bash script that is executed at the end of
                                                                            Shift|Control Altr                      Refresh the screen
                         login process. Similar to autoexec.bat in
                         DOS.                                               Shift|Control Altx                      Start an xterm session
/etc/HOSTNAME            Conatins full hostname including domain.
                                                                            Printing
/etc/cron.*              There are 4 directories that automatically
                         execute all scripts within the directory at
                         intervals of hour, day, week or month.
                                                                            /etc/rc.d/init.d/lpd start      Start the print daemon
/etc/hosts               A list of all know host names and IP
                                                                            /etc/rc.d/init.d/lpd stop       Stop the print daemon
                         addresses on the machine.
                                                                            /etc/rc.d/init.d/lpd            Display status of the print daemon
/etc/httpd/conf          Paramters for the Apache web server
                                                                            status
/etc/inittab             Specifies the run level that the machine
                                                                            lpq                             Display jobs in print queue
                         should boot into.
                                                                            lprm                            Remove jobs from queue
/etc/resolv.conf         Defines IP addresses of DNS servers.
                                                                            lpr                             Print a file
/etc/smb.conf            Config file for the SAMBA server. Allows
                                                                            lpc                             Printer control tool
                         file and print sharing with Microsoft
                         clients.                                           man subject | lpr               Print the manual page called subject
                                                                                                            as plain text
~/.Xdefaults             Define configuration for some X-
                         applications. ~ refers to user’s home              man -t subject | lpr            Print the manual page called subject
                         directory.                                                                         as Postscript output
/etc/X11/XF86Confi                                                          printtool                       Start X printer setup interface
                         Config file for X-Windows.
g
~/.xinitrc               Defines the windows manager loaded by
                         X. ~ 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

101 2.4 use debian package management
101 2.4 use debian package management101 2.4 use debian package management
101 2.4 use debian package managementAcácio Oliveira
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zsBen Pope
 
4.1 create partitions and filesystems
4.1 create partitions and filesystems4.1 create partitions and filesystems
4.1 create partitions and filesystemsAcácio Oliveira
 
package mangement
package mangementpackage mangement
package mangementARYA TM
 
Unix command
Unix commandUnix command
Unix commandAtul Pant
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationIsabella789
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernelRaghu nath
 
Introduction to linux day-3
Introduction to linux day-3Introduction to linux day-3
Introduction to linux day-3Gourav Varma
 
Unix reference sheet
Unix reference sheetUnix reference sheet
Unix reference sheetapajadeh
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line ToolsDavid Harris
 

What's hot (15)

101 2.4 use debian package management
101 2.4 use debian package management101 2.4 use debian package management
101 2.4 use debian package management
 
Linux
LinuxLinux
Linux
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zs
 
4.1 create partitions and filesystems
4.1 create partitions and filesystems4.1 create partitions and filesystems
4.1 create partitions and filesystems
 
package mangement
package mangementpackage mangement
package mangement
 
Unix command
Unix commandUnix command
Unix command
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
 
Introduction to linux day-3
Introduction to linux day-3Introduction to linux day-3
Introduction to linux day-3
 
Unix reference sheet
Unix reference sheetUnix reference sheet
Unix reference sheet
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Sunadmin
SunadminSunadmin
Sunadmin
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 

Similar to One Page Linux Manual

Similar to One Page Linux Manual (20)

The One Page Linux Manual
The One Page Linux ManualThe One Page Linux Manual
The One Page Linux Manual
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
MY Linux
MY LinuxMY Linux
MY Linux
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Termux commands-list
Termux commands-listTermux commands-list
Termux commands-list
 
Sahul
SahulSahul
Sahul
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
 
Linux shell scripting
Linux shell scriptingLinux shell scripting
Linux shell scripting
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux
Linux Linux
Linux
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Directories description
Directories descriptionDirectories description
Directories description
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
 
Clase4 (consola linux)
Clase4 (consola linux)Clase4 (consola linux)
Clase4 (consola linux)
 
lec1.docx
lec1.docxlec1.docx
lec1.docx
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 

One Page Linux Manual

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