Getting started in UNIX

Developing via command line is a love-hate thing for us as developers. And a bit of a holy war. And it contains other holy wars inside, such as vi vs. emacs. But I digress. Regardless of your reason to develop via command line, UNIX is likely where we’ll do it.

A few definitions

  • Shell: Your command prompt. A shell is technically a command language interpreter.
  • BASH (or bash): One of the most common shells in UNIX.
  • ~:  Your home directory.
  • vi and emacs:  Two of the most common text editors. You’ll also hear vim, which is effectively a superset of the vi editor.
  • ~/.bashrc: Text file that stores user-specific settings for the bash shell. Stored in your home directory.
  • ~/.vimrc: Text file that stores user-specific settings for, you guess it, vi and vim. Stored in your home directory.
  • SSH Client: Application that allows you to log onto a remote machine and execute commands (and a lot of other stuff that’s not important right now). Runs the protocol SSH (“Secure Shell”).
  • PuTTY: One of the most common SSH clients.(http://www.putty.org/)
  • mRemoteNg: Another SSH client that I personally like far more than PuTTY. (http://www.mremoteng.org/)

Let’s start with the most common UNIX commands

UNIX is all about learning the commands; and there are a lot of them. Try not to get overwhelmed or worry about understanding every command you see. Pull up your UNIX shell and let’s get rolling on a few.

  • pwd:  “Print Working Directory”. What folder are you in?
  • cd: “Change Directory”.  cd MyFolder
  • cd ..:   Move up one folder. Use “..” as another name for “the parent folder”.
  • mkdir: “Make Directory”.  mkdir SomeNewFolder
  • rm: “Remove”. Delete a file or directory.
  • cp: “Copy”. cp sourceFile targetFile

Your Thoughts?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s