Unix Commands I find useful

Command Example Description
!!echo !!
Display last command in terminal
annotate-outputannotate-output my.shRun program and annotate STDOUT/STDERR with a timestamp
application defaults gksudo gedit /etc/gnome/defaults.list
avconvavconv -i input.m4a -vcodec copy \
-acodec copy -ss 00:04:00 -t 00:09:30 \
-vn TrimmedVideo.m4a
Trim a video starting at 4:00 minutes and 9:30 minutes long
avconvavconv -i "in.m4a" -acodec libvorbis -aq 3 \
-ss 00:01:15 -t 00:27:56 -y \
-vn -ac 2 "out.ogg"
Trim a video starting at 01:05 minutes and 27:56 minutes long and convert.
/etc/aliases Aliases e.g. for emails
<alt> F2 Run application window
<ctl> <alt> F1 1st console
apt-getsudo apt-get -qy upgradeUpdate packages
blkidsudo blkidGet UUID etc data
cabextract Extract M$ CAB file
ddcprobesudo ddcprobeGets monitor information, see xrandr
dmesgdmeseg | grep DMADisplay Kernel Messages
dmidecodesudo dmidecodeBIOS information
dpkg-reconfigure Reconfigure an already installed package
ethtoolsudo ethtool eth0Display network card settings
ejecteject /dev/sr0
eject -i off
Eject CD
If drive won't open
fdisksudo fdisk -lDisplay disk info
fgfg 1Start stopped/paused processes
freefree -mFree memory display
ftp-uploadecho password |
ftp-upload -h ndrw.co.uk -s -u user
-d /public_html/test/ a.txt
Batch FTP
Uploads a.txt to /public_html/test/
cURL is another method
gconf-editorapps->nautilus->preferencesTurn off USB automount
get_iplayerget_iplayer --type=radio --pid=b007jm9l --modes=flashaaclow;
get_iplayer --type=tv --pid=b01dlc4f
Download BBC iplayer program
gmenu-simple-editor Menu editor
--create-new ~/Desktop
Create A Desktop Shortcut
gnome-panel& Start top panel
gtfgtf 1600 1200 75Calculate VESA GTF mode lines, for xorg.conf
iftop Display bandwidth usage on an interface by host
hdparmhdparm -tT /dev/sda1Hard disk throughput test
ifconfig Display/Configure network addresses
Get MAC details
iotop Monitor hard drive activity
last Last login display
ldd List shared library dependencies of an exe file
logger Logs/writes to log file
lshwsudo lshwList hardware
lspci List info about pci devices
lsusb List usb devices
mailx Send/Check Emails
mandb Creates apropos index
md5sumecho -n secret | md5sum | sed s/' -'//Creates md5sum of the word 'secret'
mountsudo mount -o loop
file.iso> /media/cdrom
Mount iso image as a drive
mount CD/DVDsudo mount /dev/sr0 /media/cdromMount CD/DVD it auto fails
mtools Label SD cards etc.
Config file /etc/mtools.conf
netstat -a Show all sockets
network restart service network-manager restart
ifdown eth1
ifup eth1
nmapnmap -sn all machines on the network
perl modulesperl -MCPAN -e 'install Geo::Coordinates::OSGB'Installs a Perl module from CPAN
pingping Multicast Group IP address
Find WIFI Extender et. al.
renicerenice -n priority -p pidChange process priority
rkhunterrkhunter --propupdRoot kit checker daemon
--propupd to update all references
run-parts Run all scripts in a directory
shut Xkill x-session-manager 
shutdownshutdown -P nowForce shutdown
sshssh -X user@hostRemote X client
startxstartx -- :1
sudo service lightdm restart
Start new X Server
sudo -b Run prog as background task
tcpdump Sniffer dumps network traffic
timeoutd Enforce idle and session time restrictions
tune2fssudo tune2fs -l /dev/sdb1List/tune filesystem parameters
unameuname -aDisplay system info
w3m text baed browser
Gets header etc.
xrandrxrandr --verboseGets monitor information, see ddcprobe
zenty Display GTK+ Dialog boxes

Miscellaneous techniques etc.

Backup Disks
Console Font
Floppy Mount
FTP Server
Hard Disk Tools
Man Creation

How do I disable overlay scrollbars?

To ~/.xprofile add this line 'export LIBOVERLAY_SCROLLBAR=0'

How do I make invisible menus display?

In Adobe Acrobat (acroread), and other programs, sometimes no drop down menus are displayed, to fix this in the startup script e.g. '/usr/bin/acroread' insert


To reposition Gnome Buttons (close, iconise)

Use Configuration Editor, apps>metacity>general>button-layout, e.g. add ',spacer' move to opposite side etc.


Useful Web Sites


Custom Search