Common SSH Commands (An Idiot's Guide)

Posted on 09/25/2010 at 09:25 am by Kevin Wentworth
Viewed 12,914 times | 2 comments

Well, I never thought I would be saying this, but I'm starting to love using SSH to manage certain elements of my server.  Now that I'm using ssh bash to make some updates to my server, I find myself constantly hunting for the simple commands.  I'm going to put all the commands I need below, because I'm the idiot and it's my guide.

Changing Directories / Navigating

cd /dir/to/go/to/

cd .. (up a directory; that's a space, then dot-dot)

cd - (back to last directory, space-hyphen)

dir  (list directories in current directory)

Delete/Remove a Directory

rm -r -f <directory> (-r = recursive; -f = without any confirmation prompts)

List File/Folder Attributes

ls -laF (-laF = no clue; that's why I'm making this guide)

Change Ownership

chown -R <user> <directory> (-R = recursive, capital R)

Change Group

chgrp -R <group> <directory> (-R = recursive)

Targeting Current Directory

. = current directory

Change Current User (create shell)

su <username> (will stay in same directory, just switch user)

su - <username> (- = will go to home directory of the user)

exit - to exit the current su/shell

Making a SymLink

ln -s /home/source/dir/ /home/target/sym/link/dir

Removing a Symlink (see)

rm /home/target/sym/link/dir (no trailing slash)

unlink /home/target/sym/link/dir (no trialing slash)


From the above list, you can see how advanced my knowledge of bash is...

-Kevin Wentworth

Bookmark and Share

Tags for Common SSH Commands (An Idiot's Guide)

Web Server Admin | Usage | Example

Comments for this Posting

Posted by Matt

on 23/10/10

Very basic. You might want to pick up an Oreilly book or two.

Posted by Kevin Wentworth

on 2/11/10


Sorry, comments are closed for this posting.

Please Email Kevin if you have any questions. Thanks!

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design