PuppyLinux Reference Card

A short guide to common commands

To be used in cli (no X-Server running) or within a terminal.

Version: 0.01a (2009-09-10)
Created by: aragon

System
fixmenus update windowmanager-menus
(wm)poweroff shutdown your system (from within X)
(wm)reboot reboot your system (from within X)
xwin COMMAND starts the x-server. COMMAND should be the startcommand of your WM (e.g. startjwm)
User
passwd* change password
System Info
cat /etc/puppyversion display puppyversion
cat /etc/windowmanager display actual windowmanager
date display the current date and time
cal display a monthly calendar
uptime display current uptime
uname -a display kernel information
uname -r display kernel version
cat /proc/cpuinfo display cpu information
dmesg display kernel (and driver) messages
free display memory and swap usage
df display disk usage
du -h /PATH/DIR display summarized disk usage for /PATH/DIR
env displays the actual environment
hardinfo -r -f txt > FILE creates a hardware-report as FILE
probepart -m display info about partitions
Logfiles
/tmp/bootkernel.log Kernel-Boot-Log
/tmp/bootsysinit.log Sysinit-Log
/tmp/xerrs.log X messages
/var/log/messages Kernel messages
Files & Directories
ls directory listing
ls -al formatted listing with hidden files and verbose information
cd DIR change directory to childdir DIR
cd /PATH/DIR change directory to /PATH/DIR
cd .. one dir up
cd - change to last directory
cd change to home
pwd display current directory
mkdir DIR create a directory in the actual path
mkdir /PATH/DIR create a directory in PATH
mkdir -p /PATH/DIR create a directory in PATH even if not all dirs in PATH exist
rm FILE* delete FILE
rm -r DIR* delete DIR
cp FILE1 FILE2 copy FILE1 to FILE2
cp -r DIR1 DIR2 copy DIR1 to DIR2, create DIR2 if it does not exist
mv FILE1 FILE2 rename or move FILE1 to FILE2 if FILE2 is an existing directory, moves FILE1 into directory FILE2
ln -s FILE LINK create symbolic link LINK to FILE
touch FILE create FILE
command > FILE (re-)places output of command in FILE
command >> FILE appends output of command to FILE
command < FILE use FILE as input for command
command1 | command2 use output of command1 as input for command2
cat FILE display the content of FILE
tac FILE display the content of FILE from last to first line
head FILE display the first 10 lines of FILE
tail FILE display the last 10 lines of FILE
tail -f FILE display the content of FILE as it grows, starting with the last 10 lines
mp FILE open FILE with mp text editor
file FILE gives info about FILE
Process Management
ps display your active processes
top display all running processes
kill PID kill process with id PID*
killall PROCESS kill all processes named PROCESS*
Searching
grep PATTERN FILES search for PATTERN in FILES
grep -nR PATTERN DIR search recursively for PATTERN in files in DIR (output with line-nr.)
command | grep PATTERN search for PATTERN in the output of command
which COMMAND show location of COMMAND in path
Compression
tar cvf file.tar FILES create a tar containing FILES
tar xvf file.tar extract a tar
tar cvzf file.tar.gz FILES create a tar with Gzip compression containing FILES
tar xvzf file.tar.gz extract a tar with Gzip compression
tar cvjf file.tar.bz2 FILES create a tar with Bzip2 compression containing FILES
tar xvjf file.tar.bz2 extract a tar with Bzip2 compression
unzip file.zip extract a zip-file
gzip FILE file.gz compresses FILE and renames it
gzip -d file.gz decompresses file.gz back to FILE
Network
wget URLTO/FILE download FILE to the actual dir
wget -c URLTO/FILE continue the download of FILE
ifconfig display info about your network
iwconfig display info about your wlan
Shortcuts
Ctrl+C ends the current command
Ctrl+R search for a recent command
UP / DOWN navigate the command history
TAB command-completion for input
TAB+TAB display possible commands for input
Bootcodes
pfix=ram do not load a save_file
pfix=fsck do a filesystem-check for pup_save
pfix=nox do not start the X-Server
Diverse
export VARIABLE setup a variable for the current session
echo $VARIABLE display the actual value of a variable
alias command='newcommand' newcommand will be executed if command is called
unalias command Remove an alias
alias -p displays all actual aliasses
*Use with (extreme) caution

Thanks:
My special thanks go to Barry Kauler for Puppy Linux in general and to Bruce B especially
for 'The Text-User Interface' (http://www.murga-linux.com/puppy/viewtopic.php?t=44123).