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.

Watch: Check Your Linux Server in 2 Minutes: OS, Kernel, RAM & CPU

Read the video transcript

Before you fix a server, you need to know what it is. In this video, you'll learn the commands that show the system's version, how long it has been running, its memory and its processor. All live, on a real Ubuntu server, with SSH Command. We're connected, with the Shell view open. Start with the operating system. head -n 4 /etc/os-release shows the Linux distribution and its version. This is Ubuntu 24.04, long-term support. uname -a prints the kernel: its name, the host name, the kernel version, and the processor type. x86_64 means a normal 64-bit Intel or AMD machine. hostname prints just the name of the server. uptime tells you how long the server has been running, how many users are logged in, and the load average. Those three numbers are the load over the last one, five and fifteen minutes. Close to zero means the server is idle. uptime -p says it in plain words. date prints the current date and time on the server. Check it when logs and clocks disagree. free -h shows memory. total is the installed RAM. used is what programs are using. available is what is still free for new programs, and it's the number to watch. Swap is disk space used as overflow memory, and zero means none is set up. nproc prints the number of processor cores. lscpu has the details, such as the model, and here we filter it with grep. And in SSH Command, the search bar lists these commands with their options. Type uname, and copy one. That's the system info toolkit: os-release and uname for what it is, uptime and date for time, free for memory, and nproc and lscpu for the processor. The full guide is at sshcommand.com, under system commands. SSH Command is free for personal use. The link is in the description. Thanks for watching.

#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