CLI AI

Linux equivalents of the Windows commands you know

2026-07-13

dir is ls -l, type is cat, findstr is grep, ipconfig is ip addr, tasklist is ps aux and netstat -ano is ss -tulpn. The full table is below, but the mapping is the easy part — case sensitivity, the missing recycle bin and CRLF line endings are what actually break your first week.

Windows Linux
dir ls -l
cd cd, and pwd to see where you are
type cat
findstr grep
copy / move / del cp / mv / rm
md / rd mkdir / rmdir
cls clear
tasklist / taskkill ps aux / kill
ipconfig ip addr
netstat -ano ss -tulpn
where command -v
systeminfo uname -a, /etc/os-release
shutdown /r reboot

1. dir → ls -l

clai
$ clai list the files here with sizes→ ls -ltotal 12-rw-r--r--    1 root     root            23 Aug 27 15:38 hosts.csvdrwxr-xr-x    2 root     root          4096 Aug 27 15:38 logs-rw-r--r--    1 root     root            17 Aug 27 15:38 notes.txt

The first column is permissions; a leading d means directory. Plain ls prints names only, -l adds size and date, -a reveals dotfiles — that is what "hidden" means here.

2. type → cat

clai
$ clai show me the contents of notes.txt→ cat notes.txtalphabetagamma

cat dumps the whole file. For something long use less (quit with q), and head or tail when you only need the ends.

3. findstr → grep

clai
$ clai find the word ERROR in every file under this folder→ grep -rn "ERROR" ../logs/app.log:1:ERROR timeout after 30s

-r walks subdirectories, -n prints line numbers. Case matters: ERROR and error are different words, add -i when you don't care.

4. ipconfig → ip addr

clai
$ clai show the ip address of my network interface→ ip addr show eth0122: eth0@if123: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP     link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff    inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0       valid_lft forever preferred_lft forever

inet is the IPv4 address, link/ether is the MAC. The interface isn't always eth0 — on a real machine it may be enp5s0 or wlan0, and ip addr with no argument lists them all.

5. tasklist → ps

clai
$ clai show running processes with their ids→ ps -o pid,commPID   COMMAND    1 sh   13 sleep   14 ps

Bare ps only shows your own session. ps aux is the full list, and taskkill /PID becomes kill <pid>.

6. netstat -ano → ss -tulpn

clai
$ clai show what is listening on port 8099→ ss -tulpn 'sport = :8099'Netid State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess                              tcp   LISTEN 0      5          127.0.0.1:8099      0.0.0.0:*    users:(("python3",pid=1027487,fd=3))

ss replaces netstat, which modern distributions no longer ship. Read the flags as: -t tcp, -u udp, -l listening only, -p process, -n no name lookups. The Process column is the direct equivalent of the PID from netstat -ano.

Gotchas

  • Case matters everywhere. Notes.txt and notes.txt are two different files, and LS is not a command. This is the number one reason a script that "worked on my machine" doesn't.
  • There is no recycle bin. rm deletes immediately and permanently, while del at least had somewhere to go. List the targets with ls using the same pattern before you run rm -r.
  • A script written on Windows won't start. CRLF line endings produce bash: ./crlf.sh: /bin/sh^M: bad interpreter: No such file or directory with exit code 126. Fix it with sed -i 's/\r$//' script.sh and switch your editor to LF.

Related questions

Which version am I running? cat /etc/os-release gives the distribution and its version, uname -srm gives kernel and architecture. Together they replace systeminfo.

Where is Program Files? Binaries live in /usr/bin, their data in /usr/share, configuration in /etc, third-party packages often in /opt. There is no single programs folder.

What replaces Explorer? mc gives you a two-pane file manager in the terminal, familiar to anyone who remembers Far or Norton Commander.

See also

CliAI lets you keep describing the task the way you already think about it, and shows the Linux command before it runs. Install it in one line.