|
Close XTerm window
|
exit or ^D
|
|
Display current path
|
pwd
|
|
Change to a new directory
|
cd /(directory name)
|
|
Move up one directory
|
cd ..
|
|
Move back to home directory
|
cd ~
|
|
List contents of current dir
|
ls (including hidden files = ls -al)
|
|
Put list of directory into a file called foo.txt
|
ls -al > foo.txt
|
|
Create a directory and call it foo
|
mkdir foo
|
|
Remove empty diectories
|
rmdir
|
|
Print a file
|
lpr filename.txt
|
|
Delete a file
|
rm foo.txt
|
|
Edit a text file
|
(name of text editor like pico or vi) filename
|
|
Copy foo.txt and call it foo2.txt
|
cp foo.txt foo2.txt
|
|
Move a file
|
mv foo.txt /home/foo.txt
|
|
Rename a file
|
mv foo.txt foocopy.txt (same as move, but without a new dir)
|
|
Create or combind "concatenate" text files
|
cat > filename (^D quits)
|
|
Login as root from user prompt
|
su (then root password)
|
|
Logout as root back to user prompt
|
exit
|
|
Clear the screen of previous text
|
clear
|
|
Read a text file
|
less filename.txt (space for next screen, b for back, q for quit)
|
|
Combind commands together
|
use the "pipe" key = (shift + \) command1 | command2
|
|
Print a listing of all files in a directory
|
ls -al|lpr
|
|
List files in brian's homedir one screen at a time
|
ls ~brian|less
|
|
Load a flopy disk
|
mount /mnt/floppy (contents then appear in /mnt/floppy/)
|
|
Load a CD
|
mount /mnt/cdrom (contents them appear in /mnt/cdrom)
|
|
View help file for a command
|
man commandname or info commandname
|
|
Print the lpr man page
|
man lpr|col -b|lpr
|
|
Find the word "bar" (regardless of case) in foo.txt
|
grep -i bar foo.txt
|
|
Find a file by name
|
find [start path] -type [d=dir f=file] -name "filename"
|
|
Check what mounted on the system
|
mount
|
|
Check disk space
|
df
|
|
Check TCP/IP settings
|
ifconfig
|
|
Check for echo response from another system
|
ping -c 3 host.domain (will ping a system by name 3 times; pings are infinite if -c # is not used) Ctrl+C to stop ping loops.
|
|
Check route path to another system
|
traceroute host.domain (same as NT/2000; "tracert" in Win95/98/ME)
|
|
Display current environment & system settings
|
env
|
|
Display system settings only
|
uname -a (all)(prints: sysname[-s], netname[-n], OS release[-r], OS version[-v], Machine type[-m], processor[-p]).
|
|
Use menus in terminal
|
mc = midnight commander, the text version of the GNOME file manager.
|
|
Display text file one page at a time
|
more
|
|
Identify Shell types by prompt
|
$ = bourne shell, $ = user, # = root
|
|
Logout of Linux
|
logout
|
|
Shut the system down
|
shutdown (-h = off, -r = reboot, +# = minutes to shutdown)
or poweroff, or reboot
halt will stop system only. Then use ctrl+alt+del to reboot.
|
|
Switch to another GUI at next XWindow login
|
switchdesk
|
|
Format floppy disk
|
mkfs -t ext2 /dev/fd0 (or use gnofloppy/kfloppy when in GUI)
|
|
Change login screens
|
Ctrl+Alt+F1-F6 (F7 = default XWindow)
|
|
Location of most shared programs
|
/usr/bin (users, binaries)
|
|
Set access rights
|
chmod dir or filename permission# (4=read, 2=write, 1=edit; per order= root, owner,
allusers) example: 756= root has all, owner has read+edit, allusers have read+write.
'chmod 777 foo.txt' would give all users full rights to foo.
|
|
User creating
|
useradd (username) ; passwd newuser (password)
|