Basic UNIX commands and utilities

Andrew Porter
Published: 6 January 2020
Share:

When managing your 20i web hosting, you may wish to enable SSH access for one or more of your packages.

Enabling SSH access will give you easier management of your package(s), as you'll be able to use UNIX commands and utilities to carry out tasks and activities.

Here's a list and explanation of some basic commands:

ls – 'ls' (list) is perhaps one of the more commonly used commands. It will list all of the files in the current working directory (the directory the user is currently-in).

 

-lah - this series of letters changes the appearance of the output: 'l' means in the long list format (so it's ordered and more readable), 'a' means all files/directories (don't ignore hidden files that begin with a '.') and 'h' means to print sizes of files/directories in a human readable format, e.g., 1.0K, 234M, 3.5G instead of the exact number of bytes.

 

pwd – the 'pwd' command (print working directory), will output/write the full path of the current working directory.

 

cd – 'cd' (change directory) allows a user to move from one directory to another.

 

mv – 'mv' (move) lets you move files and directories from one location to another.

 

cp – 'cp' (copy) will allow a user to copy files and directories from one location to another.

 

rm – 'rm' (remove) allows the removal of many types of objects, such as, files, directories, and symbolic links.

 

man – the 'man' (manual) command can be used to display the documentation/manual page(s) for command line tools.

 

mkdir – 'mkdir' (make directory) can be used to create a directory.

 

grep – 'grep' (global regular expression print) is a useful command line tool that allows you to search for patterns, and their corresponding lines, in the input file(s) specified.

 

du – 'du' will show the disk usage of the files and directories in the directory specified (if a directory is not specified, the current working directory will be used).