Unix Basics

Shared

VPS

Dedicated

 

WP Professional

WP Professional Plus

If you've been managing your Web files solely through FTP, the thought of learning Unix might be a little daunting. But it's actually not that bad once you get the hang of it. We'll get you started with a short introduction.

The first step is to log into the server using SSH.

See Existing Files (ls)

Once you're logged in, type in the command ls. This gives you a listing of all your files and directories (the Unix term for folders). You should see a directory called public_html. This is your web directory, where all your website files should be stored

Enter a New Directory (cd)

Now enter the command cd public_html to move into that directory. This is like double-clicking on a folder to open it. To see the files in the new directory, enter the ls command again to see its contents.

Return to the Previous Directory (cd ..)

You can return to your public_html directory by typing cd .. This command will always take you up one level no matter where you are.

Create New File (pico)

Once you're in the new directory, you can create a new file by typing pico newfilename where "newfilename" is replaced with whatever you want to call it.

You'll see command options at the bottom of the window.

Tip!

The ^ symbol means the Ctrl key. So to scroll down a page you would press the Ctrl and V keys at the same time.

You can exit the text editor by pressing Ctrl and X. If you've made changes to the file it will ask if you want to save them. Hit Y to confirm, then hit Enter.

Editing a File (pico)

Let's edit a file. Enter the command pico filename. Replace "filename" with the name of one of your files. This will open the file right in the command line for you to edit.

Tip!

The ^ symbol means the Ctrl key. So to scroll down a page you would press the Ctrl and V keys at the same time.

You can exit the text editor by pressing Ctrl and X. If you've made changes to the file it will ask if you want to save them. Hit Y to confirm, then hit Enter.

Creating a Directory (mkdir)

Now let's create a brand new directory. Type mkdir directoryname where "directoryname" is the name of the new directory. Then, to enter the directory, type cd directoryname.

To Learn More

There are many other things that you can do with Unix. For now, you may just want to get comfortable with these commands. You can learn more about each of them by typing man commandname, such as man ls or man cd.

You can also find more help here:

UNIX Beginners Guide

Updated on June 26, 2019

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support