Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a list of random shell commands that solved problems for me.

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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment