GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

The Unix Shell: Commands and Navigation

bullet Introduction

When you connect to your VPS you land at a shell — the command-line interpreter where you type commands to manage the server. This page is a short orientation to moving around the file system, the commands you will use most, and customizing your shell. It applies to both FreeBSD 15 and Rocky Linux 10.

 

bullet Navigating the File System

Files live in a single tree that starts at / (the root directory). Your own files live under your home directory, written ~. The handful of commands below cover most navigation:

$ pwd                  # print the directory you're currently in
$ ls -l                # list files here, with details
$ cd ~/public_html     # change directory (~ is your home)
$ cd ..                # move up one level
$ mkdir backups        # make a directory
$ cp a.html b.html     # copy        (cp -r for a whole directory)
$ mv old.html new.html # move or rename
$ rm scratch.txt       # remove  (there is no undo -- be sure)

To see what a file contains, less file pages through it (press q to quit), cat file dumps it, and tail -f file follows a file as it grows — the standard way to watch a log live.

 

bullet Files, Ownership, and Permissions

Every file has an owner, a group, and read/write/execute permissions. ls -l shows them; you change them with chmod (permissions) and chown (ownership, root only):

$ chmod 644 page.html              # owner read/write; group and others read-only
$ chmod 755 script.sh              # add execute (for programs and directories)
# chown youruser:youruser file.txt # change owner and group

For web content the usual pattern is directories 755 and files 644, owned by you and readable by the web-server group — the Apache page shows the exact chown/find commands.

 

bullet Editing Files

You will frequently edit configuration files in place. Two beginner-friendly editors are available: nano (install with pkg install nano or dnf install nano; on-screen shortcuts, easy to learn) and, for the willing, the powerful vi/vim. FreeBSD also ships ee (Easy Editor) in its base system. Pick one and get comfortable with saving and quitting; everything else follows.

 

bullet Customizing Your Shell

Your shell reads a startup file each time you log in — ~/.cshrc for the C shell (FreeBSD's default for new users) or ~/.bashrc / ~/.bash_profile for bash (common on Rocky Linux). Use it to set your PATH, define aliases, and configure tools. To change which shell you use:

# FreeBSD:    pw usermod jsmith -s /usr/local/bin/bash
# Rocky Linux: usermod -s /bin/bash jsmith

Install an alternative shell from packages first (for example bash or zsh) if it is not already present.

 

bullet Documentation

Every command has a manual page — man ls, man chmod, man cp — and the same pages are published online at www.gsp.com/support/man/. On the VPS, man <command> is always the authoritative copy for the exact version you have installed.


Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2026 GSP Services, Inc.