SSH Command in Linux with examples

System information commands in Linux

Find out what machine you are on, how busy it is and what has happened.

#uname

Kernel and system

Syntaxuname [-a]
  • uname -a

    Kernel version, host name and architecture

  • uname -m

    Just the architecture (x86_64, aarch64)

#uptime

How long it has been running

Syntaxuptime
  • uptime

    Time up, users, and the load average

#hostname

Server name

Syntaxhostname [-I]
  • hostname

    The server's name

  • hostname -I

    Its IP addresses

#date

Date and time

Syntaxdate [+format]
  • date

    Current date and time

  • date +%Y-%m-%d

    2026-10-10 style date, good for file names

  • date -u

    UTC time

#lscpu

CPU details

Syntaxlscpu
  • lscpu

    Model, cores and speed

#lsb_release

Distribution name

Syntaxlsb_release -a
  • cat /etc/os-release

    Works on nearly every distribution

  • lsb_release -a

    Debian and Ubuntu style

#dmesg

Kernel messages

Syntaxsudo dmesg [-T]
  • sudo dmesg -T | tail

    Recent hardware and driver messages with readable times

#lsof

Open files and ports

Syntaxsudo lsof [options]
  • sudo lsof -i :80

    Which program uses port 80

  • sudo lsof -u alice

    Everything user alice has open

#history

Commands you typed before

Syntaxhistory
  • history

    Numbered list

  • history | grep ssh

    Find an earlier command

  • !123

    Run command number 123 again

TipPress Ctrl+R and start typing to search your history live.

#env / printenv

Environment variables

Syntaxprintenv [name]
  • printenv HOME

    Show one variable

  • env

    Show all of them

#lspci / lsusb

Hardware lists

Syntaxlspci | lsusb
  • lspci

    Devices on the PCI bus

  • lsusb

    USB devices

Run these commands with SSH Command

SSH Command is a desktop app for Mac, Windows and Linux that puts a real terminal, SFTP file panes, a sudo switch and a searchable Linux command finder in one window. Type what you want to do, and send the command to your server with one click.

Download free Windows commands with examples SFTP & FTP client