# Información general

## General

```bash
# Sistema
uname -a
cat /etc/*release
cat /etc/issue
# Hostname, host y DNS
cat /etc/hostname /etc/hosts /etc/resolv.conf
```

## Usuarios y grupos

```bash
whoami
id
cat /etc/passwd
# Usuarios
cat /etc/passwd | cut -d: -f1
# Usuarios con consola
cat /etc/passwd | grep "sh$"
```

## Procesos

```sh
ps aux | grep root
```

### Process snooping

### pspy

<https://github.com/DominicBreuker/pspy>

```sh
./pspy -pf -i 1000 
```

### tmux

```sh
ps aux | grep tmux
/usr/bin/tmux -S <id-session-tmux>
```

## Servicios de red

### Puerta de enlace (gateway)

```sh
route -n
```

### netstat

```sh
netstat -antupo
```

* -a = todos los sockets.
* -n = hosts, puertos y usuarios en formato numérico.
* -t = TCP.
* -u = UDP.
* -p = PID (Process Identification Number) y nombre del programa.
* -o = timer.
