250 words
1 minutes
System Information
2025-04-03

This section is about learning basic Linux commands that help you understand your system, check network settings, and manage users. These commands are useful for general Linux tasks and also important in cybersecurity for checking security settings, finding weaknesses, or fixing security issues.

Basic Commands to Check System Information:

Linux Command Cheat Sheet#

User & System Information#

CommandDescription
whoamiDisplays your current username
idShows user identity (UID, GID, and groups)
hostnameShows or sets the system’s hostname
unameDisplays OS and hardware info (uname -a for all details)
whoLists currently logged-in users
envDisplays or sets environment variables

File System & Directories#

CommandDescription
pwdPrints your current working directory
lsblkLists all block storage devices (disks, partitions)
lsofShows all open files and which processes are using them

Network Utilities#

CommandDescription
ifconfigDisplays or configures network interfaces (deprecated, use ip instead)
ipModern tool for network configuration (ip addr, ip route)
netstatShows network connections (use ss for newer systems)
ssSocket statistics (replacement for netstat)

Hardware Information#

CommandDescription
lsusbLists all connected USB devices
lspciLists all PCI devices (graphics cards, network controllers, etc.)

Process Management#

CommandDescription
psLists running processes (ps aux for detailed list)

Checking Network Information:

  • ifconfig – Shows IP addresses and network settings (old command, replaced by IP).
  • ip – Displays and changes network settings.
    • Example:
$ ip a

(Shows IP addresses assigned to network interfaces.)

  • netstat – Shows network connections and open ports.
  • ss – A faster alternative to netstat for checking open network connections.

Checking System Processes and Files:

  • ps – Shows running processes.
  • who – Lists all logged-in users.
  • env – Displays system environment variables.
  • lsblk – Shows information about storage devices.
  • lsusb – Lists connected USB devices.
  • lsof – Shows open files and which processes are using them.
  • lspci – Lists PCI (hardware) devices like graphics or network cards.
System Information
https://fuwari.vercel.app/posts/system-information/
Author
Ranjung Yeshi Norbu
Published at
2025-04-03