Updated: 10 November 2026 · Applies to: Kali GNU/Linux Rolling 2026.3 (kalilinux/kali-rolling image); most commands also work on Debian and Ubuntu

Kali Linux is based on Debian, so its basic commands are the normal Linux ones: cat /etc/os-release shows the Kali version, uname -r the kernel, sudo apt update refreshes the package lists, and ip a, df -h and ps aux show network, disk and processes. Below is a practical reference grouped by task, with real output from a Kali Rolling 2026.3 lab container. When you work as a normal user (Kali's documentation uses the user kali in its examples), put sudo in front of commands that change the system.

Check the Kali Linux version

cat /etc/os-release

Output (first lines):

PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2026.3"
VERSION="2026.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian

Kali is a rolling release: VERSION_ID shows the last snapshot you updated to, and "Kali GNU/Linux" is simply the full name of the system. The same information in a shorter form:

lsb_release -a

Output:

Distributor ID:	Kali
Description:	Kali GNU/Linux Rolling
Release:	2026.3
Codename:	kali-rolling

If lsb_release is missing, install it with sudo apt install lsb-release.

Check the kernel

uname -r

uname -a adds the host name, build date and architecture (x86_64, or aarch64 on ARM). In a container these commands show the host's kernel, so run them on the Kali machine itself.

Update Kali and install software (apt)

sudo apt update

It ends with a summary such as:

28 packages can be upgraded. Run 'apt list --upgradable' to see them.
  • apt list --upgradable: what would be updated.
  • sudo apt full-upgrade -y: install all updates (the command Kali's own update guide uses). The full procedure is in How to Update Kali Linux from the Terminal.
  • sudo apt install nmap: install a package. apt-cache policy nmap shows the version available (7.991 in our test).
  • apt search keyword and apt show package: find a package and read its description.
  • sudo apt remove package and sudo apt autoremove: remove software and unused dependencies.

Kali groups its tools in metapackages. apt-cache search --names-only '^kali-linux-' lists them, among others:

kali-linux-core - Kali's core packages
kali-linux-default - Kali's default toolset
kali-linux-everything - Every tool in Kali Linux
kali-linux-headless - Kali's default headless tools
kali-linux-large - Kali's extended default tool selection

A minimal Kali (the container image, for example) has none of them, so install kali-linux-headless on a server without a desktop, or kali-linux-default for the usual tool set.

Files and folders

  • pwd: show the current folder. ls -la: list files, including hidden ones.
  • cd /path, cd .. and cd ~: change folder, go up, go home.
  • mkdir name, cp src dst, mv old new, rm file (rm -r folder for folders, with care).
  • cat file, less file, nano file: show, page through or edit a file.
  • grep -ri "text" /path: search inside files. find / -name "file*" 2>/dev/null: find files by name.
  • chmod +x script.sh and chown user:group file: change permissions and owner.

Users and permissions

  • whoami and id: your user and groups.
  • sudo -i: open a root shell (type exit to leave it).
  • passwd: change your password. sudo adduser alice: add a user.

Output of id as root:

uid=0(root) gid=0(root) groups=0(root)

System, disk and processes

df -h /

Output (lab container):

Filesystem      Size  Used Avail Use% Mounted on
overlay          48G   32G   15G  69% /
  • free -h: memory and swap. uptime: load and running time.
  • ps aux and top: running processes. kill PID: stop one.
  • sudo systemctl status ssh, sudo systemctl start ssh, sudo systemctl enable ssh: manage services. To set up SSH see How to install SSH service on Kali Linux.
  • history: your earlier commands. man command or command --help: built-in help.

The container image is minimal: ps, free, ip, sudo and man were missing until we installed procps, iproute2, sudo and man-db. If a minimal Kali system lacks a command, install the package that provides it.

Network

ip -br a

Output (lab container):

lo               UNKNOWN        127.0.0.1/8 ::1/128
eth0@if1902      UP             10.88.6.174/16 fe80::50bd:85ff:fe61:c4e6/64 

Keyboard layout (AZERTY and others)

To switch the keyboard to French AZERTY for the current desktop session only:

setxkbmap fr

To change it for the whole system (console and desktop), Debian's documentation, which applies to Kali, uses:

sudo dpkg-reconfigure keyboard-configuration

Choose the layout, then apply it with sudo setupcon -k -f or reboot. The setting is stored as XKBLAYOUT="fr" in /etc/default/keyboard.

Desktop (user interface)

Kali offers several desktops as packages: apt-cache search --names-only '^kali-desktop-' lists Xfce, GNOME, KDE, MATE, LXDE, i3 and E17. According to Kali's documentation, you install another one and pick the default session with:

sudo apt update
sudo apt install -y kali-desktop-kde
sudo update-alternatives --config x-session-manager

Then reboot. Kali's documentation warns that Xfce and KDE conflict, so it removes Xfce when installing KDE, while Xfce and GNOME can live side by side.

Use Kali tools responsibly

Run Kali's security tools only against systems you own or have written permission to test. The Ucartz Acceptable Use Policy allows security testing only on VPS or dedicated servers (including Kali Linux VPS), only for assets you have written authorisation for, and never on shared hosting.

Official documentation: Kali Linux documentation, Debian Wiki: Keyboard.

Related services

Kali Linux VPS

pre-installed with VNC and full root for pentesting labs.

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Was this answer helpful?

Still stuck? Open a ticket