SSH Cheat Sheet EN
SSH Cheat Sheet EN
Online
Ultimate
SSH Commands
Cheat Sheet
SSH
cd
wget
mkdir
...
Ultimate SSH Commands Cheat Sheet 1
This article will cover 17 basic SSH commands and each of their functions. You’ll find
the cheat sheet most useful when managing a Linux server or a VPS.
ls pwd
This command lists the names of files This command shows the full path of the
and directories. Follow it up with -a to directory you are currently in.
display hidden files and directories.
cd mv
Type cd [directory name] to switch Use the command mv [file name]
between directories. [destination] to move the file to the
cd.. go back to the previous directory. chosen folder. Example: mv /home/
hostinger/ftp/myfile.txt/home/
cd/ return to the root directory.
hostinger/myfolder
find
The basic syntax for this command is find [starting directory] [options] [keyword].
[starting directory] indicates the search area. Choose one of the three options:
[options] is an additional flag to narrow down the search. Choose one of the three
options, and then follow it up with the search keyword.
Use It Today
Modifying Files
cat tar
The cat [file name] command This command creates or extracts tar.gx files.
displays the content of the tar -xzvf [file name.tar.gx]
given file. Use cat [file source extracts compressed tar.gx file.
1] [file source 2] > [merged
tar -cvzf [file name.tar.gx] [/path/to/directory]
file] to create a new file by
compresses a folder in tar.gx format.
merging two or more files.
vi/nano grep
The vi [file name] and nano Use this to look for a specific string in a chosen file.
[file name] commands allow grep “word” [file name]
you to access the Vi and prints lines containing the case-sensitive keyword.
Nano text editors for
grep -i “word” [file name]
creating and editing files in
does a case-insensitive search.
the terminal.
grep -v “word” [file name]
prints lines not containing the keyword.
grep -c “word” [file name]
counts the number of findings.
wget clear
Use the wget http://fileurl/filename.ext This command clears all text
command to download files from the Internet. from the terminal’s screen.
du history
The du [directory] command displays the This command displays the last used
size of files and folders in the chosen commands. Add a numeric number
directory in disk block format. Add -h after after history to determine the limit of
du to convert the result in a readable format. the results. Use the history -c
command to clear your history.