Show processes and sub-processes in a tree:
pstree
Restart networking stuff in Ubuntu:
sudo /etc/init.d/networking restart
Undo an add in mercurial:
hg status -an0 | xargs -0 hg revert
```
Check linux kernel version and processor type:
```shell
uname -a
```
Show how much disk space remains and show how big the files/directories in the current directory are.
```shell
df -h
du -sh *
```
Ports in use:
```shell
sudo netstat -taupen
```