Again this post is an unusual one. The second unusual one after the first one on linux command lines. The reader will not find a series of paragraphs with a ine of thought in it but rather a collection of command lines and related telegraphic recommendations for some aspects of the Linux Universe (e.g. Ubuntu).

Happy command line experience!

- To install a debian package via command line
# dpkg -i deb package

- To list the packages we have installed
dpkg -l

- To indetify whether a package name is installed
dpkg -l | grep package name

(you can also try withhttp://securityandrisk.blogspot.de/search?max-results=2000)

- To know the status of networking interfaces
#rfkill list

- To unlock one of them
#rfkill unblock number

- To start the firestarter firewall
#/etc/init.d/firestarter start

- To dump all traffic seen by the network interface not sent to or by your box and not part of multicast or broadcast
#tcpdump -i eth0 net 192.168.x.0/24 and not host 192.168.x.a and not multicast and not broadcast

- Nice and easy way to identify the networks this box has been
#grep -i NetworkManager /var/log/syslog

- To edit the scheduler in linux
crontab -e

- The basic way to use vi or vim:

To move into the text: h l j k
To replace a character under cursor with c rc
To insert before or after the cursor i a
To open a new line below or above the current line o O
To delete a character x
To undo the last command u
To select a line yy
To paste a line p P
To write and exit :wq
To toggle edit/meta mode ESC

When installing packages, you will find the config files in /etc/apt/apt/conf and the binary files in /usr/bin

- You need to define a network interface in Linux via a config file and not via NetworkManager? Then this is the location and syntaxedit /etc/network/interfacesin the fileiface eth0 inet staticaddress 192.168.1.2netmask 255.255.255.0gateway 192.168.1.1

- You need to define a DNS servers in Linux via a config file and not via NetworkManager? Then this is the location and syntax/etc/resolv.conf nameserver 8.8.8.8

- You need to declare the name of your host via a config file? Then this is the location and syntax/etc/hosts 127.0.0.1 localhost

- You need to swith on/off a network interface in Linux via the command line and not via NetworkManager?Then you can use ifup/ifdown orsudo ifconfig downsudo ifconfig up

- A quick way to become root?sudo su -

- Need to get processes associated with a nameps aux | grep name

- A non-elegant way to kill a process?killall processname

- You need to get rid of the disturbing sound with typingsudo modprobe –r pcspkr