Linux Commands

Everyday Linux Administration Commands

Linux: Scheduling Commands




Command Description
crontab -l List entries in cron table
crontab -e Edit Entries in cron table
atq Displays pending jobs
at -l Lists at jobs pending, same as atq command
atrm jobnumber Remove at entry for jobnumber jobnumber. Jobnumbers displayed by atq command.
at HH:MM -f /dir/test.sh Run the script test.sh at the specified time
jobs Displays Jobs
fg Brings job into foreground
bg Background job
kill %number Terminate jobnumber %number


Linux: Shutdown Commands


Command Description
telinit Switch runlevel
init Switch runlevel
reboot Reboots system when run by root user
shutdown -r Reboot system
shutdown -h now Shutdown Immediately
shutdown -c Cancels shutdown
shutdown -k Send out Shutdown message, disable logins, however Does not shutdown system

Linux: Printer Commands


Command Description
lp file Print file
lpq Display print queue
lpstat -d Display default printer
lpr -P printer filename Print using lpr command. Print filename to specified printer printer
lpoptions -d default_printer Set default printer default_printer
lp -n no_of_copies filename Print filename no_of_copies times
lprm job_id Delete/Cancel print job. Job id is normally displayed after print command.

Linux: Miscellaneous Commands


Command Description
history Display commands entered
!number Repeat command displayed from history command
diff file1 file2 Display difference between file1> file2
dd if=/dev/zero of=test.dat bs=1024 count=10240 Create a 10MB file using dd command
dd if=/dev/zero of=test.dat bs=1M count=10 Create a 10MB file (Easy to understand version)
cal Display calendar for current month
cal -m number of month Displays calendar for specified number of month
date Displays Today's date and time
fallocate -l 3G file.img Create a file of specified size with the specified name
watch command Execute a program periodically
column Formats input into multiple columns