You are on page 1of 1

LIST OF BASIC puTTY COMMANDS

Syntax Purpose
Shows the present working
pwd
directory
Used to navigate into a specific
cd
directory in a server
cd /home Navigates into the home folder
cd . Remains in the same directory
cd .. Move back one directory
cd - Go to previous directory
cd ~ Go to home directory
cd / Navigate to root directory
Used in a folder to display all
ls [option][file]
its contents
ls -a Displays all files in a directory
ls -h Displays contents with file size
ls -is List files by files size
List all folders in directory
ls -alh
with details
cp [filename with file
Copy a file
extension][directory]
cp -r Copy folder with all files
mv [filename with file
Moving a file
extension][directory]
mv [filename with file
extension][directory][new Moving and renaming a file
filename]
mv [filename].. Move file up one directory
mkdir [folder name] Create a folder
touch [filename with file Creates different files and file
extension] extensions
zip -r [foldername].zip
Compressing folders
[foldername]
unzip [foldername].zip Uncompressing folders
tar -czvf [foldername].tar.gz Compressing folders using tar -
[foldername] czvf
rm [filename with file extension] Deletes a file on your server
Removes all files from a
rm * [foldername]
directory
rmdir Removes a folder/directory
chmod Changes file permissions
Change permissions of folder and
chmod 775 [foldername] -R
all files inside

You might also like