- On macOS and Linux you can use
Terminal. - If you are running Windows, you can download an SSH client, such as
PuTTY.
ssh, followed by your shell username (cPanel username), an @ sign, then your server name. For example:
Navigation
pwd — lists the path you are currently in, so you don’t get lost. The output usually looks like /home/user/public_html/example, meaning you are in the folder “example”.
ls -lah — lists the files in the folder you are currently in, along with additional information such as size, last modified time and date, and permissions.
cd — used to move to the relevant folder/directory.
Creating / modifying / viewing
mkdir [directoryname] — creates a new directory in your current location.
touch [filename.ext] — creates a new file. Note you should put the extension at the end, such as .txt.
You can modify files with one of two editors. By default nano is used more often by less experienced users:
nano [filename].txt — opens the file in nano. You can read full information on how to use it by pressing F1 or Ctrl+G.
You can also use vim to edit files. This editor is for more advanced users; press F1 for help with commands once the file is open:
vim [filename].php
You can view a file using cat — for example cat [filename.txt] will display the contents of filename.txt in text format.
Tip: You can use cat in combination with grep to find text inside a file. The content will be displayed but the requested text will be highlighted in red so you can find it more easily:
cat [filename.txt] | grep "Nov 13 13:07" — displays the contents of [filename.txt], then (the | is called a pipe, and separates commands) highlights text matching “Nov 13 13:07” exactly.
If you find a command on the web and would like to understand it, we recommend https://explainshell.com, which breaks down what the command does — it’s excellent for learning.