Discovering a New Linux Machine
Essential commands to gather important information about a Linux machine:
hostname # Display the hostname of the machine
uname -a # Display all kernel information
uname -r # Kernel release
uname -m # Machine hardware name
lsb_release -a # Display LSB information, including the distribution name and release
cat /etc/os-release # Display the operating system name and version
cat /etc/issue # Display the operating system name, version, and other info
lscpu # Display CPU information
free -h # Display memory information
df -h # Display disk space information
ifconfig # Check network configuration
ip a # Display IP addresses and network interfaces
netstat -tuln # Check network connections
ps aux # Check running processes
lsof # Check open files
who # Check logged in users
w # Display who is logged on and what they are doing
last # Check last logged in users
mount # Display list of mounted file systems
uptime # Display system load and uptime
lsusb # List USB devices (Universal Serial Bus)
lspci # List PCI devices (Peripheral Component Interconnect)
lsscsi # List SCSI devices (Small Computer System Interface)
cat /etc/passwd # List users
systemctl list-units --type=service # List all systemd services
References
https://linuxjourney.com/