Updated: 4 November 2026 · Applies to: PuTTY 0.85 on Windows (pscp, psftp and plink tested with the Linux build 0.83), commands tested on Debian 13, Ubuntu 26.04 and AlmaLinux 10
PuTTY has no commands of its own: once you are logged in, you type Linux commands into the server's shell. This cheat sheet lists PuTTY's mouse and keyboard shortcuts, the shell keys that save typing, the Linux commands beginners need most, and PuTTY's command-line tools (pscp, psftp and plink). The Linux commands work the same in any SSH client. Not connected yet? See How to access your Server or VPS using Putty? If you want a server to practise on, a small KVM VPS gives you full root access.
1. Copy, paste and scroll in PuTTY
- Copy: select text with the left mouse button. It is copied as soon as you let go. Ctrl+C does not copy in PuTTY: it stops the running command on the server.
- Paste: right-click, or press Shift+Insert. Ctrl+right-click opens PuTTY's menu, which also has Paste.
- Scroll back: Shift+PgUp and Shift+PgDn move a page, Ctrl+PgUp and Ctrl+PgDn move a line, Ctrl+Shift+PgUp jumps to the top.
2. Shell keys
These come from Bash on the server, so they work in every SSH client:
- Tab: complete a file, folder or command name.
- Up arrow: the previous command. Ctrl+R: search your command history.
- Ctrl+A and Ctrl+E: jump to the start or end of the line.
- Ctrl+U and Ctrl+K: delete to the start or end of the line.
- Ctrl+L: clear the screen (same as
clear). - Ctrl+C: stop the running command. Ctrl+Z: pause it (
fgbrings it back). - Ctrl+D on an empty line, or
exit: log out.
3. Linux commands cheat sheet
Moving around
pwd # where am I? ls -la # list files, including hidden ones, with details cd /var/www # go to a folder cd .. # one level up cd ~ # your home folder cd - # back to the previous folder
Files and folders
mkdir -p backups/2026 # create a folder (and its parents) cp file.txt file.bak # copy a file cp -r site site-copy # copy a folder mv old.txt new.txt # rename or move rm file.txt # delete a file rm -r old-folder # delete a folder and everything in it (no undo)
More: How to Rename Files and Folders in Linux (mv and rename) and How to Remove a Directory in Linux (rmdir and rm -r).
Reading and editing files
cat file.txt # print a short file less /var/log/syslog # scroll through a long file (q to quit) tail -n 50 /var/log/nginx/error.log # the last 50 lines tail -f /var/log/nginx/error.log # follow a log as it grows (Ctrl+C to stop) nano /etc/hosts # edit a file (Ctrl+O to save, Ctrl+X to exit)
New to nano? See Linux Nano Editor Explained for Beginners.
Finding things
find /var/www -name "wp-config.php" # find files by name grep -rn "DB_NAME" /var/www/html # find text inside files, with line numbers
Disk, memory and processes
df -h # free disk space du -sh /var/www/* # size of each folder free -h # memory top # live CPU and memory use (q to quit) ps aux --sort=-%mem | head # the processes using the most memory kill 1234 # stop the process with ID 1234
More: How to List Running Processes in Linux (ps, top, htop and pgrep).
Network
ip -br address # IP addresses of the server ss -tlnp # listening ports and the programs behind them ping -c 4 example.com # is a host reachable? curl -I https://example.com # response headers of a website
Archives
tar -czf site.tar.gz site/ # pack a folder into site.tar.gz tar -xzf site.tar.gz # unpack it
Users, permissions and services
whoami # which user am I? sudo -i # become root (if you are allowed to) passwd # change your password chmod 644 file.php # owner can write, everyone can read chown -R www-data:www-data site # change the owner (user names differ per system) sudo systemctl restart nginx # restart a service sudo systemctl status nginx # check it sudo journalctl -u nginx -n 50 # its last 50 log lines
Updates and help
sudo apt update && sudo apt upgrade # Ubuntu and Debian sudo dnf upgrade # AlmaLinux, Rocky Linux, Fedora man ls # the manual of a command (q to quit) history # commands you typed before
More commands by topic: Linux Commands List by Category: A Quick Reference and Basic Linux Commands with Examples: ls, cd, grep, chmod.
4. PuTTY command-line tools
The PuTTY installer for Windows includes pscp, psftp and plink next to putty.exe. Run them in Command Prompt or PowerShell. Replace user and 203.0.113.10 with your login and server address.
putty.exe -ssh user@203.0.113.10 -P 2222 # open PuTTY on port 2222 putty.exe -load "My server" # open a saved session putty.exe -ssh user@203.0.113.10 -i C:\keys\server.ppk # log in with a key pscp C:\temp\backup.sql user@203.0.113.10:/home/user/ # upload a file pscp user@203.0.113.10:/etc/hosts C:\temp\hosts.txt # download a file pscp -r C:\site user@203.0.113.10:/var/www/ # upload a folder pscp -P 2222 ... # another SSH port psftp user@203.0.113.10 # interactive: ls, cd, get FILE, put FILE, quit plink user@203.0.113.10 "df -h" # run one command and return plink -m commands.txt user@203.0.113.10 # run the commands from a file
A remote path without a leading / is relative to your home folder on the server. Lab output from the Linux build of the same tools (connection options left out):
$ plink -i lab.ppk lab@server "whoami; pwd" lab /home/lab $ pscp -i lab.ppk notes.txt lab@server:/home/lab/ notes.txt | 0 kB | 0.0 kB/s | ETA: 00:00:00 | 100%
With -batch (for scripts), PuTTY never asks questions, so a server whose host key you have not accepted yet fails at once with FATAL ERROR: Cannot confirm a host key in batch mode. Connect once without -batch and accept the key first. Use an SSH key (-i) rather than a password on the command line: see How to Create SSH Keys on Windows and Log In to a Linux Server.
5. More PuTTY and SSH help
- Server on another SSH port: How to Connect to SSH on a Different Port (ssh, scp, sftp, rsync, PuTTY).
- Keep a long job running after you disconnect: 5 Ways to Keep Remote SSH Sessions and Processes Running After Disconnection.
- Session drops when idle: How to Stop SSH Session Timeouts (ServerAliveInterval, ClientAliveInterval) and Exit, Kill or Stop SSH.
- Pause, resume and background jobs: Linux Job Control Cheat Sheet: ps, kill, bg, fg, nohup.
Official documentation: PuTTY user manual.