Wednesday, November 30, 2011

THE ONE PAGE LINUX MANUAL

Version 3.0 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
/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.
~/.Xdefaults Define configuration for some Xapplications.
~ refers to user’s home
directory
/etc/X11/XF86Confi
g
Config file for X-Windows.
~/.xinitrc Defines the windows manager loaded by X. ~ refers to user’s home directory
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
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.

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




Windows Xp Keyboard Commands

Run Commands To Access The Control Panel:

Add/Remove Programs control appwiz.cpl

Date/Time Properties control timedate.cpl
Display Properties control desk.cpl
FindFast control findfast.cpl
Fonts Folder control fonts
Internet Properties control inetcpl.cpl
Keyboard Properties control main.cpl keyboard
Mouse Properties control main.cpl
Multimedia Properties control mmsys.cpl
Network Properties control netcpl.cpl
Password Properties control password.cpl
Printers Folder control printers
Sound Properties control mmsys.cpl sounds
System Properties control sysdm.cpl

Run Commands:

compmgmt.msc - Computer management

devmgmt.msc - Device manager
diskmgmt.msc - Disk management
dfrg.msc - Disk defrag
eventvwr.msc - Event viewer
fsmgmt.msc - Shared folders
gpedit.msc - Group policies
lusrmgr.msc - Local users and groups
perfmon.msc - Performance monitor
rsop.msc - Resultant set of policies
secpol.msc - Local security settings
services.msc - Various Services
msconfig - System Configuration Utility
regedit - Registry Editor
msinfo32 _ System Information
sysedit _ System Edit
win.ini _ windows loading information(also system.ini)
winver _ Shows current version of windows
mailto: _ Opens default email client
command _ Opens command prompt

Windows XP Shortcuts:

ALT+- (ALT+hyphen) Displays the Multiple Document Interface (MDI) child
window's System menu
ALT+ENTER View properties for the selected item
ALT+ESC Cycle through items in the order they were opened
ALT+F4 Close the active item, or quit the active program
ALT+SPACEBAR Display the System menu for the active
window
ALT+TAB Switch between open items

ALT+Underlined letter Display the corresponding menu
BACKSPACE View the folder one level up in My Computer or Windows Explorer
CTRL+A Select all
CTRL+B Bold
CTRL+C Copy
CTRL+I Italics
CTRL+O Open an item
CTRL+U Underline
CTRL+V Paste
CTRL+X Cut
CTRL+Z Undo
CTRL+F4 Close the active document
CTRL while dragging Copy selected item
CTRL+SHIFT while dragging Create shortcut to selected iteM
CTRL+RIGHT ARROW Move the insertion point to the beginning of the next word
CTRL+LEFT ARROW Move the insertion point to the beginning of the previous word
CTRL+DOWN ARROW Move the insertion point to the beginning of the next paragraph
CTRL+UP ARROW Move the insertion point to the beginning of the previous paragraph
SHIFT+DELETE Delete selected item permanently without placing the item in the Recycle Bin
ESC Cancel the current task
F1 Displays Help
F2 Rename selected item
F3 Search for a file or folder
F4 Display the Address bar list in My Computer or Windows Explorer
F5 Refresh the active
window
F6 Cycle through screen elements in a
window or on the desktop
F10 Activate the menu bar in the active program
SHIFT+F10 Display the shortcut menu for the selected item
CTRL+ESC Display the Start menu
SHIFT+CTRL+ESC Launches Task Manager
SHIFT when you insert a CD Prevent the CD from automatically playing
WIN Display or hide the Start menu
WIN+BREAK Display the System Properties dialog box
WIN+D Minimizes all Windows and shows the Desktop
WIN+E Open Windows Explorer
WIN+F Search for a file or folder
WIN+F+CTRL Search for computers
WIN+L Locks the desktop
WIN+M Minimize or restore all windows
WIN+R Open the Run dialog box
WIN+TAB Switch between open items



Windows Explorer Shortcuts:

ALT+SPACEBAR - Display the current
window’s system menu
SHIFT+F10 - Display the item's context menu
CTRL+ESC - Display the Start menu
ALT+TAB - Switch to the
window you last used
ALT+F4 - Close the current
window or quit
CTRL+A - Select all items
CTRL+X - Cut selected item(s)
CTRL+C - Copy selected item(s)
CTRL+V - Paste item(s)
CTRL+Z - Undo last action
CTRL+(+) - Automatically resize the columns in the right hand pane
TAB - Move forward through options
ALT+RIGHT ARROW - Move forward to a previous view
ALT+LEFT ARROW - Move backward to a previous view
SHIFT+DELETE - Delete an item immediately
BACKSPACE - View the folder one level up
ALT+ENTER - View an item’s properties
F10 - Activate the menu bar in programs
F6 - Switch between left and right panes
F5 - Refresh
window contents
F3 - Display Find application
F2 - Rename selected item



Internet Explorer Shortcuts:

CTRL+A - Select all items on the current page

CTRL+D - Add the current page to your Favorites
CTRL+E - Open the Search bar
CTRL+F - Find on this page
CTRL+H - Open the History bar
CTRL+I - Open the Favorites bar
CTRL+N - Open a new
window
CTRL+O - Go to a new location

CTRL+P - Print the current page or active frame
CTRL+S - Save the current page
CTRL+W - Close current browser
window
CTRL+ENTER - Adds the http://www. (url) .com

SHIFT+CLICK - Open link in new
window
BACKSPACE - Go to the previous page

ALT+HOME - Go to your Home page
HOME - Move to the beginning of a document
TAB - Move forward through items on a page
END - Move to the end of a document
ESC - Stop downloading a page
F11 - Toggle full-screen view
F5 - Refresh the current page
F4 - Display list of typed addresses
F6 - Change Address bar and page focus
ALT+RIGHT ARROW - Go to the next page
SHIFT+CTRL+TAB - Move back between frames
SHIFT+F10 - Display a shortcut menu for a link
SHIFT+TAB - Move back through the items on a page
CTRL+TAB - Move forward between frames
CTRL+C - Copy selected items to the clipboard
CTRL+V - Insert contents of the clipboard
ENTER - Activate a selected link
HOME - Move to the beginning of a document
END - Move to the end of a document
F1 - Display Internet Explorer Help



Accessibility Shortcuts

Tap SHIFT 5 times - Toggles StickyKeys on and off.

Press down and hold the right SHIFT key for 8 seconds - Toggles FilterKeys on and off.
Press down and hold the NUM LOCK key for 5 seconds - Toggles ToggleKeys on and off.
Left ALT+left SHIFT+NUM LOCK - Toggles MouseKeys on and off.
Left ALT+left SHIFT+PRINT SCREEN - Toggles High Contrast on and off.


Microsoft Office Keyboard Shortcut Keys
Important Word Shortcuts

All Caps - CTRL+SHIFT+A

Annotation - ALT+CTRL+M
Auto Format - ALT+CTRL+K
Auto Text - F3 or ALT+CTRL+V
Bold - CTRL+B or CTRL+SHIFT+B
Bookmark - CTRL+SHIFT+F5
Copy - CTRL+C or CTRL+INSERT
Copy Format - CTRL+SHIFT+C
Copy Text - SHIFT+F2
Create Auto Text - ALT+F3
Date Field - ALT+SHIFT+D
Delete Back Word - CTRL+BACKSPACE
Delete Word - CTRL+DELETE
Dictionary - ALT+SHIFT+F7
Do Field Click - ALT+SHIFT+F9
Doc Maximize - CTRL+F10
Doc Move - CTRL+F7
Doc Restore - CTRL+F5
Doc Size - CTRL+F8
Grow Font - CTRL+SHIFT+.
Grow Font One Point - CTRL+]Hanging Indent - CTRL+T
Header Footer Link - ALT+SHIFT+R
Help - F1
Hidden - CTRL+SHIFT+H
Hyperlink - CTRL+K
Indent - CTRL+M
Italic - CTRL+I or CTRL+SHIFT+I
Justify Para - CTRL+J
Left Para - CTRL+L
Line Up Extend - SHIFT+UP
List Num Field - ALT+CTRL+L
Outline - ALT+CTRL+O
Outline Collapse - ALT+SHIFT+- or ALT+SHIFT+NUM -
Outline Demote - ALT+SHIFT+RIGHT
Outline Expand - ALT+SHIFT+=
Outline Expand - ALT+SHIFT+NUM +
Outline Move Down - ALT+SHIFT+DOWN
Outline Move Up - ALT+SHIFT+UP
Outline Promote - ALT+SHIFT+LEFT
Outline Show First Line - ALT+SHIFT+L
Lock Fields - CTRL+3 or CTRL+F11
Web Go Back - ALT+LEFT
Web Go Forward - ALT+RIGHT
Word Left - CTRL+LEFT
Word Left Extend - CTRL+SHIFT+LEFT
Word Right - CTRL+RIGHT



Excel Time saving Shortcuts


Move to next cell in row - Tab

Move to previous cell in row - Shift + Tab
Up one screen - Page Up
Down one screen - Page Down
Move to next worksheet - Ctrl + Page Down
Move to previous worksheet - Ctrl + Page Up
Go to first cell in data region - Ctrl + Home
Go to last cell in data region - Ctrl + End
Bold toggle for selection - Ctrl + B
Italic toggle for selection - Ctrl + I
Underline toggle for selection - Ctrl + U
Strikethrough for selection - Ctrl + 5
Change the font - Ctrl + Shift + F
Change the font size - Ctrl + Shift + P
Apply outline borders - Ctrl + Shift + 7
Remove all borders - Ctrl + Shift + Underline
Wrap text in same cell - Alt + Enter
Format cells - Ctrl + 1
Select font - Ctrl + Shift + F
Select point size - Ctrl + Shift + P
Format as currency - Ctrl + Shift + 4
Format as general - Ctrl + Shift + # (hash sign)
Format as percentage - Ctrl + Shift + 5
Format as number - Ctrl + Shift + 1
Autosum a range of cells - Alt + Equals Sign
Insert the date - Ctrl + ; (semi-colon)
Insert the time - Ctrl + Shift + ; (semi-colon)
Insert columns/rows - Ctrl + Shift + + (plus sign)
Insert a new worksheet - Shift + F11
Read Monitor Cell One - Alt + Shift + 1
Read Monitor Cell Two - Alt + Shift + 2
Read Monitor Cell Three - Alt + Shift + 3
Read Monitor Cell Four - Alt + Shift + 4
List Visible Cells With Data - Ctrl + Shift + D
Lists Data In Current Column - Ctrl + Shift + C
List Data In Current Row - Ctrl + Shift + R
Select Hyperlink - Ctrl + Shift + H
Move To Worksheet Listbox - Ctrl + Shift + S
Move To Monitor Cell - Ctrl + Shift + M
Select Worksheet Objects - Ctrl + Shift + O
List Cells At Page Breaks - Ctrl + Shift + B
Options Listbox - Insert + V





Easy move through Powerpoint

Apply subscript formatting - CTRL+EQUAL SIGN (=)

Apply superscript formatting - CTRL+PLUS SIGN (+)
Bold - CTRL+B
Capitalize - SHIFT+F3
Copy - CTRL+C
Delete a word - CTRL+BACKSPACE
Demote a paragraph - ALT+SHIFT+RIGHT ARROW
Find - CTRL+F
Insert a hyperlink - CTRL+K
Insert a new slide - CTRL+M
Italicize - CTRL+I
Make a duplicate of the current slide - CTRL+D
Open - CTRL+O
Open the Font dialog box - CTRL+T
Paste - CTRL+V
Print - CTRL+P
Promote a paragraph - ALT+SHIFT+LEFT ARROW
Repeat your last action - F4 or CTRL+Y
Save - CTRL+S
Select all - CTRL+A
Start a slide show - F5
Switch to the next pane (clockwise) - F6
Switch to the previous pane - SHIFT+F6
Undo - CTRL+Z
View guides - CTRL+G