Comandos Linux/Debian

Versão
uname -a
Hardware
lscpu
free -h
lsblk
Uptime
uptime
CPU / Memória
top
--- Status de interfaces
ip address show
Interface detalhada
ip addr show eth0
ethtool eth0
DDM / Transceiver
ethtool -m eth0
--- Status geral de rede
netstat -tulnp
Status da interface
ip link show eth0
Estatísticas da interface
ip -s link show eth0
Informações ópticas
ethtool eth0
--- Dispositivos conectados
arp -a
Hosts descobertos
nmap -sn 192.168.1.0/24
--- Informações completas do sistema
hostnamectl
RX/TX da interface
ifconfig eth0
Estado das interfaces
ip link
Estatísticas da interface
sar -n DEV 1
--- Entrar como root
sudo -i
Ativar interface
ip link set eth0 up
Desativar interface
ip link set eth0 down
--- Adicionar usuário
useradd gustavo
passwd gustavo
Adicionar grupo
groupadd suporte
Alterar permissões
chmod 777 arquivo.txt
--- Reiniciar serviço
systemctl restart apache2
Deletar usuário
userdel gustavo
--- Criar diretório
mkdir backup
Mover arquivo
mv arquivo.txt /backup/
Copiar arquivo
cp arquivo.txt /backup/
--- Tabela ARP / MAC
arp -a
--- Logs
journalctl -xe
Alarmes / erros
dmesg | less
Ping
ping 8.8.8.8
Traceroute
traceroute 1.1.1.1
--- Salvar configuração de rede
netplan apply
Reiniciar sistema
reboot

Leave A Comment