TD-e.com

TD-enotes title image
English
spacer

              


Console commands



A few simple console commands or terminal commands for the linux console are listed here. It aims to be a memory refresh, especially when one can't remember easily the precise syntax or the order of the parameters needed.

cat

example :
cat /proc/bus/input/devices
purpose :
lists the input devices.

chown

example :
chown username:username filename
purpose :
change the owner of a file.

example :
chown --reference=modelfilename filename
purpose :
change the owner of a file. The new owner will be the same one as the owner of a reference file.

cp

example :
cp /pathname/filename1 /pathname/filename2
purpose :
copy file.

dig

example :
dig @xx.xx.xx.xx td-e.com
purpose :
find out the answer time of a dns server, xx.xx.xx.xx must be the ip number of a dns server.

exiftool

example :
exiftool −common /path/to/a/folder/or/file
purpose :
read and display the common exif fields of the files in a folder, or of a single file.

example :
exiftool −a −u −g1 /path/to/a/folder/or/file
purpose :
read and display all the exif fields of the files in a folder, or of a single file. -a stands for read all, -u stands for reading also unknown fields, -g1 stands for sorted by group.

eject

example :
eject cdrom0
purpose :
eject the cdrom in unit cdrom0.

export

example :
export
purpose :
lists the environment variables.

example :
export SHELL="/bin/bash"
purpose :
setting the environment variable SHELL.

fsck

example :
fsck /somepath
purpose :
Linux file system check, the path should not be mounted.

hdparm

example :
hdparm -E4 /dev/hdc
purpose :
slow down the cd rotation speed.
comment :
useful when you are listening to an audio CD and it is turning with maximum speed. This is annoying because it is too loud and it is not necessary to play the music.

java

example :
java -jar Arachnophilia.jar
purpose :
running java program

killall

example :
killall -9 wine-preloader
purpose :
killing wine, e.g. when a windows application doesn't react anymore.

lsusb

example :
lsusb
purpose :
list the usb devices.

mkdir

example :
mkdir xyz
purpose :
make directory xyz.

mkdosfs

example :
mkdosfs -F 32 /dev/sda1
purpose :
make a dos partition.

mke2fs

example :
mke2fs /dev/sda2
purpose :
make a ext2 partition.

mount

example :
mount -t reiserfs /dev/hdb10 /media/p10
purpose :
mount partition 10 of 2nd Hard Drive to /media/p10.

mtr

example :
mtr www.wallpaper4computer.com
purpose :
traceroute = lists the route to a given domain or ip number.

nano

example :
nano filename
purpose :
nano is a text editor which is a little bit easier to use than other command line editors, in case you absolutely need to, to do repairs! But of course it is not comparable to comfortable gui editors like gedit, bluefish, kate or quanta.

nmap

example :
nmap -sP 192.168.0.0/24
purpose :
Lists the used ip numbers in the given block.

nslookup

example :
nslookup domain.com
purpose :
finds out the ip number of a domain.

play

example :
play xy.wav
purpose :
play the sound from a wav file.

pwd

example :
pwd
purpose :
show the current directory.

rm

example :
rm xyz
purpose :
remove file xyz.

example :
rm xyz -r
purpose :
remove directory xyz (recursively).

example :
rm -r /home/[username]/.wine/drive_c/Windows/WININIT.INI
purpose :
booting wine manually (as normal user NOT root).

sh

example :
sh /path/file.sh
purpose :
run shell. In KDE menu editor, enter path in *work path*, check box *run in terminal*.

sox

example :
sox file.wav file.ogg
purpose :
convert a wav file to an ogg file.

ssh

example :
ssh -p22 username@domain.com
purpose :
ssh - remote system shell on a distant computer through port 22, type exit to leave or log out.

umount

example :
umount /media/usbdisk
purpose :
unmounting a card reader which has been mounted as /media/usbdisk. Mounting and unmounting must be done by the root user, except if the normal user has rights to do it. The right to a normal user to do it, can be given in the file /etc/fstab.

wget

example :
wget -q -O /dev/null http://www.domain.com/filename.php > /dev/null [6 21 * * *]
purpose :
start a php script as a cron job on a server with wget

whereis

example :
whereis filename
purpose :
find where a file is.

wine

example :
wine "/some/path/setup.exe"
purpose :
install a windows application, the install file being of the type setup.exe.

example :
wine msiexec /i installfile.msi
purpose :
install a windows application, the install file being of the type file.msi.

example :
wine "c:\windows\uninstall.exe"
purpose :
uninstall a windows application.

wineboot

example :
wineboot
purpose :
the automatic way to booting wine (normal user NOT root)

winecfg

example :
winecfg
purpose :
wine configuration

xgamma

example :
xgamma -gamma 1.15
purpose :
modify the monitor gamma calibration by a factor of 1.15
comment :
many gui applications to calibrate the gamma of a monitor do call xgamma behind the scenes. Since xgamma does not work with some specific types of graphic card hardware, the gui applications which are frontends to xgamma won't work either.

Remark: Most of the commands above are available in a terminal window by default. Nevertheless, some commands must be additionally installed. To the Ubuntu users, they are available in Synaptic.

Blog of TD-e.com
Add a comment


Main |  Software |  Photo |  Quiz |  Reviews |  Tips |  Tutorials |  Flags |  Contact |  About


Page tested with Opera, Epiphany, Konqueror, Firefox.
Copyright © 2005-2008 td-e.com, All rights reserved.
... ...
.. ..
. .