0% found this document useful (0 votes)
378 views

One Page Linux Manual

This document provides a one page summary of useful Linux commands for starting and stopping the system, accessing and mounting file systems, finding and viewing files, installing software, user administration, and the X Window System. It also includes some tips and tricks for networking, manuals, and file mounting.

Uploaded by

Adam
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
378 views

One Page Linux Manual

This document provides a one page summary of useful Linux commands for starting and stopping the system, accessing and mounting file systems, finding and viewing files, installing software, user administration, and the X Window System. It also includes some tips and tricks for networking, manuals, and file mounting.

Uploaded by

Adam
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

THE ONE PAGE Ô×ÒËÈ MANUAL

ß ­«³³¿®§ ±º «­»º«´ Ô·²«¨ ½±³³¿²¼­

Ê»®­·±² íòð Ó¿§ ïççç ­¯«¿¼®±²à°±©»®«°ò½±³ò¿«

rm name Remove a file or directory called

Starting & Stopping name

rm -rf name Kill off an entire directory and all it’s

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

reboot mv filename Move the file called filename to the

/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

man -k keyword Display man pages containing


startx Start the X system
keyword

Accessing & mounting file systems more filetoview Display the file called filetoview one

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)
rpm -i --force package Reinstall the rpm package called
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
tar -zxvf archive.tar.gz or Decompress the files contained in
which missingfilename Show the subdirectory containing the
tar -zxvf archive.tgz the zipped and tarred archive called
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

The X Window System User Administration
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

Moving, copying, deleting & viewing files Little known tips and tricks
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


ls -F List files in current directory and

indicate the file type usermount Executes graphical application for

mounting and unmounting file


ls -laC List all files in current directory in
systems
long format and display in columns
/sbin/e2fsck hda5 Execute the filesystem check utility

on partition hda5
File permissions
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


If the command ls -l is given, a long list of file names is
the current directory to the directory

named configs. displayed. The first column in this list details the permissions

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
or z. Write = 2
octal code for each user type. eg
linux single At the lilo prompt, start in single user Execute = 1
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

passwd command. chmod 7 5 5 Full permission for the owner, read and

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

at login. Right click on desktop Display menu

background
etc/rc.d/rc.local Bash script that is executed at the end of

login process. Similar to autoexec.bat in Shift|Control Altr Refresh the screen

DOS.
Shift|Control Altx Start an xterm session

/etc/HOSTNAME Conatins full hostname including domain.

/etc/cron.* There are 4 directories that automatically Printing


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

file and print sharing with Microsoft lpc Printer control tool

clients.
man subject | lpr Print the manual page called subject

~/.Xdefaults as plain text


Define configuration for some X-

applications. ~ refers to user’s home Print the manual page called subject
man -t subject | lpr
directory. as Postscript output

/etc/X11/XF86Confi Config file for X-Windows. printtool Start X printer setup interface

~/.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

You might also like