User Tools

Site Tools


linux:commands

Force reboot

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

Scan with NMAP

nmap -p 1-65535 -T4 -A -P0 -v hostname/ip

Check vulnerabilities

nmap -Pn --script vuln hostname/ip

Manual IP/GW Configuration

ifconfig eth0 10.0.0.1 netmask 255.255.255.0
route add default gw 10.0.0.254

Restart SWAP

sudo /sbin/swapoff -a && sudo /sbin/swapon -a

Free cache

echo 3 > /proc/sys/vm/drop_caches

dd full drive

dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync

erase full drive

dd if=/dev/zero of=/dev/sdY bs=64K conv=noerror,sync

linux/commands.txt · Last modified: 2024/10/14 13:27 by Jan Forman