Over SSH you work directly on your service: you move and unpack files, see what is running and start long tasks. You do not need many commands. The ones on this page cover almost all daily work. Each table is one kind of task, and the links lead to the guides that explain a topic in full.

How to connect: SSH how to get connected. You work as your own user in your own home folder, not as root; the end of this page says what that means.


Four Keys That Save the Most Time

KeyWhat it does
TabCompletes the name of a command, file or folder you started to type. Press it twice to see all matches.
Arrow upBrings back the previous command, so that you can run it again or correct it.
Ctrl+CStops the command that is running.
Ctrl+RSearches the commands you typed before: press it and type a part of the command.

Where You Are

CommandWhat it does
pwdShows the folder you are in. After the login it is your home folder, for example /home2/alexdemo. The number after home differs from service to service.
ls -laLists the files of the folder with size, owner and date, hidden files too.
cd downloadsGoes to a folder. cd .. goes one level up, cd alone goes back to your home folder.

Which folder is for what: Where Are My Files? The Folders of Your App Hosting Service.

Files and Folders

CommandWhat it does
mkdir -p data/photosCreates a folder, with the folders above it if they are missing.
cp notes.txt copy.txtCopies a file. For a folder: cp -r photos photos-copy.
mv old.txt new.txtRenames a file or folder, or moves it to another folder. Do not move the files of a torrent that is still seeding; the torrent client would no longer find them.
rm notes.txtDeletes a file. For a folder with everything in it: rm -r photos. There is no recycle bin.
ln -s ~/downloads dlCreates a link named dl that leads to your downloads folder.
mcOpens a file manager with two panels inside SSH. F10 closes it.

Space

CommandWhat it does
quota -sShows the space you use and your limit.
df -h ~Shows the size and the free space of the whole disk your home folder is on.
du -sh ~/downloadsShows how much space one folder takes. The command reads every file in it, so a large folder takes a while.

More: See How Much Space You Use on Your Service.

Read and Search

CommandWhat it does
cat notes.txtPrints a short file.
less app.logOpens a long file to read: arrows and Page Down move, /word searches, q closes.
tail -n 20 app.logShows the last 20 lines. tail -f keeps showing new lines until you press Ctrl+C.
nano notes.txtOpens a file in a simple editor: Ctrl+O and Enter save, Ctrl+X closes.
grep -ri "error" logsFinds a word in all files of a folder; -i ignores capital letters.
find ~/downloads -name "*.mkv"Finds files by their name in a folder and all folders below it.

Pack, Unpack and Check

CommandWhat it does
unrar x file.rarUnpacks a RAR archive. unzip file.zip and 7z x file.7z do the same for ZIP and 7z: Unpack RAR, ZIP and 7z Archives on Your Service via SSH.
zip -r photos.zip photosPacks a folder into one file: Pack a Folder Into One File Before Downloading: zip, tar and 7z via SSH.
sha256sum file.isoPrints the checksum of a file: Check That a Download Is Complete and Undamaged: Checksums via SSH.

Download and Copy

CommandWhat it does
wget https://example.org/file.zipDownloads a file from a link into the current folder: Download Files From a Link Straight to Your Service.
rsync -avP photos/ user@host:photos/Copies a folder to another service or server and continues where it stopped: Copy Your Files to Another Service or Server With rsync.

For cloud storage, see rclone: Install It and Copy Files Without Overloading Your Service.

Programs and Long Tasks

CommandWhat it does
ps -u $USER -o pid,etime,argsLists your running programs with their number (PID) and how long they have been running.
htop -u $USERShows your programs with their processor and memory use. q closes it.
kill 1234Asks the program with this number to stop. kill -9 1234 stops it by force.
tmuxKeeps a command running after you close SSH: tmux: Keep a Command Running After You Close SSH.
crontab -eRuns commands at fixed times: Run a Command on a Schedule With cron on App Hosting.

To restart or stop an app, use its buttons in the Client Area and not kill: Restart, Stop, Update, Reinstall or Uninstall an App: What Each Button Does. Which app uses the most: Which App Uses the Most Memory? Check It via SSH.

Videos and Torrents

CommandWhat it does
mediainfo movie.mkvShows the format, resolution, audio tracks and subtitles of a video: See What Is Inside a Video File via SSH: mediainfo.
ffmpegTakes screenshots, cuts samples and changes the container of a video: ffmpeg via SSH: Screenshots, Samples and Other Formats From Your Videos.
mktorrentCreates a torrent file from a folder: Create a Torrent via SSH With mktorrent.

What Does Not Work

  • You are not root. sudo does not exist, and apt install answers are you root?. Install apps with the buttons in the Client Area.
  • Programs that are not in the Client Area can often be installed into your home folder, for example yt-dlp or Node.js.
  • You see only your own files and programs, not those of other users.

Good to Know

  • Names are case sensitive. Notes.txt and notes.txt are two different files.
  • Put names with spaces between quotes: cd "My Folder".
  • One heavy task at a time. Packing, unpacking, checksums and du on large folders load the same disks that your apps use. Run them one after another, not together.
  • Help: ls --help prints the options of a command, man ls opens its manual (q closes it), history lists the commands you typed, exit ends the SSH session.
  • The clock in SSH: Set Your Own Time Zone for SSH Sessions on App Hosting.
Was this answer helpful? 0 Users Found This Useful (0 Votes)