You’ve had the weekend to mentally prepare yourself for the first “workout” in our UNIX Sysadmin Boot Camp, so now that you’ve finished stretching your hammies, we’ll jump right into training. In Welcome to the Jungle, I talked about the command line as a fantastically powerful resource, so my goal is to help you wield that power.
Before you can do any actual wielding, you’re going to need to know how to find this exotic “command line” we’ve already talked so much about. Unless you managed to sneak your way through the layers upon layers of security and into your server’s data center, you won’t be able to plug a keyboard and monitor directly into your server. You do have access to the next best thing, though: the Secure Shell – or SSH – network protocol. SSH allows data to be exchanged securely between two networked devices, and when the “network” between your workstation and server is the Internet, the fact that it does so “securely” is significant.
Instructions to SSH into your server are included in your introductory information from The Planet, as well as in your Orbit interface. You can use a third-party client such as PuTTY, WinSCP if your workstation is Windows-based, or if you’re on Linux or Mac, you can access SSH from your terminal application: ssh user@ipaddress
. Once you’ve gotten into your server, you’ll probably want to find out where you are, so give the pwd
command a try:
user@serv: ~$ pwd/home/useruser@serv: ~$
It’s as easy as that. Now we know we’re in the /home/user
directory. Most of the time, you’ll find yourself starting in your home directory. This is where you can put personal files and documents. It’s kind of like “My Documents” in Windows, just on your server.
Now that you know where you are, you’ll probably want to know what’s in there. Take a look at these commands (extracted from a RedHat environment, but also usable in CentOS and many other distributions):
user@serv: /usr/src $ ls | This will give you a basic listing of the current directory. |
user@serv: /usr/src $ ls /usr/src/redhat | This will list the contents of another specified directory. |
user@serv: /usr/src $ ls ./redhat | Using a “relative pathname,” this will perform the same action as above. |
user@serv: /usr/src $ ls redhat | Most of the time, you’ll get the same results even without the “./ ” at the beginning. |
user@serv: /usr/src $ cd /usr/src/redhat/ | This is an example of using the cd command to change directories to an absolute pathname. |
user@serv: /usr/src $ cd redhat | This is an example of using the cd command to change directories to a relative pathname. |
user@serv: /usr/src/redhat $ cd /usr/src | To move back on directory from the working directory, you can use the destination’s absolute path. |
user@serv: /usr/src/redhat $ cd .. | Or, since the desired directory is one step down, you can use twp dots to move back. |
You’ll notice many similarities to the typical Windows DOS prompts, so it helps if you’re familiar with navigating through that interface: dir
, cd
, cd ..
, cd /
. Everything else on the other hand, will prove to be a bit different.
Now that you’re able to access this soon-to-be-powerful-for-you tool, you need to start learning the language of the natives: bash. In our next installment, we’ll take a crash course in bash, and you’ll start to get comfortable navigating and manipulating content directly on your server.
-Ryan
Related Posts:
- Lilah Brown's Planets, Part II (or, Season II preview) [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Snow White needs a bailout [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- To the moon [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- S/1 90482 (2005) needs your help [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- We'll always have Regulus [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Orcus Porcus [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Kant's Crowded Universe [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Look up! [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Baby Pictures [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Encore: Yelping at Saints [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Godspeed [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Heavens above! [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Homeward bound [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Sony Pictures and the end of the world [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Thank you from the future [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Lunar dreams [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- The first of the Pluto books! [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Don't try to blame it on Rio [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Rio roundup [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- The long road to a Titan storm [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Planetary Placemats [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Fog! Titan! Titan Fog! (and a peer review experiment) [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Millard Canyon Memories [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- The problem with science [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- P.S. on the problem with science [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- How Big is 10 TB? [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Showing You Your Servers [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Pick Your Partnership: Referral Partners, Resellers and Affiliates [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Server Form Factors: Towers v. Rack-Mounts [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Lights-Out in the Data Centers [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Disruptive Technologies: Virtualization and The Cloud [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Know Thy Backups – Part I [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Know Thy Backups – Part II [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Boo Bash 2009 – Desktop Costume Included! [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- Why No One Will Talk About “Cloud Computing” in 10 Years [Last Updated On: November 8th, 2009] [Originally Added On: November 8th, 2009]
- The end of the fall [Last Updated On: December 13th, 2009] [Originally Added On: December 13th, 2009]
- We Love ‘Server Huggers’ [Last Updated On: December 13th, 2009] [Originally Added On: December 13th, 2009]
- All About the Cloud: An Interview with Dell’s Cloud Evangelist [Last Updated On: December 13th, 2009] [Originally Added On: December 13th, 2009]
- Happy Solstice [Last Updated On: December 21st, 2009] [Originally Added On: December 21st, 2009]
- A ghost of Christmas past [Last Updated On: December 31st, 2009] [Originally Added On: December 31st, 2009]
- Learning from a Blender [Last Updated On: January 5th, 2010] [Originally Added On: January 5th, 2010]
- Changing my world [Last Updated On: January 6th, 2010] [Originally Added On: January 6th, 2010]
- A Server. From Scratch. [Last Updated On: January 7th, 2010] [Originally Added On: January 7th, 2010]
- The Planet Sand Castle: Upgrade Your Sandbox [Last Updated On: January 12th, 2010] [Originally Added On: January 12th, 2010]
- Hosting for Haiti [Last Updated On: January 20th, 2010] [Originally Added On: January 20th, 2010]
- Redefining Value [Last Updated On: January 26th, 2010] [Originally Added On: January 26th, 2010]
- My Experience as a Newbie at The Planet [Last Updated On: January 28th, 2010] [Originally Added On: January 28th, 2010]
- Confessions of Another New Planeteer [Last Updated On: February 1st, 2010] [Originally Added On: February 1st, 2010]
- How I Learned to Stop Worrying and Love Permissions [Last Updated On: February 11th, 2010] [Originally Added On: February 11th, 2010]
- Where at The Planet is Rachel? [Last Updated On: February 15th, 2010] [Originally Added On: February 15th, 2010]
- The Planet Storage Cloud: FYI [Last Updated On: February 19th, 2010] [Originally Added On: February 19th, 2010]
- Meet us in March [Last Updated On: February 25th, 2010] [Originally Added On: February 25th, 2010]
- The Planet in “The Channel” [Last Updated On: March 2nd, 2010] [Originally Added On: March 2nd, 2010]
- The Planet Server Challenge [Last Updated On: March 13th, 2010] [Originally Added On: March 13th, 2010]
- The Definitive Guide to Finding The Planet at SXSW [Last Updated On: March 13th, 2010] [Originally Added On: March 13th, 2010]
- The SXSW Iron Geek Champion! [Last Updated On: March 15th, 2010] [Originally Added On: March 15th, 2010]
- Drinking from the Fire Hose [Last Updated On: March 16th, 2010] [Originally Added On: March 16th, 2010]
- The Fastest Hands at SXSW [Last Updated On: March 17th, 2010] [Originally Added On: March 17th, 2010]
- System.out.println(“Hello World!”); [Last Updated On: March 22nd, 2010] [Originally Added On: March 22nd, 2010]
- Westmere – Get it Here [Last Updated On: March 23rd, 2010] [Originally Added On: March 23rd, 2010]
- Orbit on Your iPhone: A Sign of Things to Come [Last Updated On: March 24th, 2010] [Originally Added On: March 24th, 2010]
- #ShowMeMyServer 2.0 [Last Updated On: March 25th, 2010] [Originally Added On: March 25th, 2010]
- Get to Know Your Visitors [Last Updated On: March 30th, 2010] [Originally Added On: March 30th, 2010]
- The Next Big Thing in Hosting: The Hostatulator [Last Updated On: April 1st, 2010] [Originally Added On: April 1st, 2010]
- Storage Cloud and the City [Last Updated On: April 4th, 2010] [Originally Added On: April 4th, 2010]
- American Heart – Why I Walk [Last Updated On: April 7th, 2010] [Originally Added On: April 7th, 2010]
- The Cake Shouldn’t Be a Lie [Last Updated On: April 8th, 2010] [Originally Added On: April 8th, 2010]
- April Showers Bring May Flowers [Last Updated On: April 9th, 2010] [Originally Added On: April 9th, 2010]
- First at The Planet: Nehalem EX 4-Socket Servers [Last Updated On: April 15th, 2010] [Originally Added On: April 15th, 2010]
- Intel Guest Blog: Xeon 5600 [Last Updated On: April 16th, 2010] [Originally Added On: April 16th, 2010]
- Inside the Office: A Birthday Surprise [Last Updated On: April 18th, 2010] [Originally Added On: April 18th, 2010]
- The Planet @ Cloud Expo East [Last Updated On: April 19th, 2010] [Originally Added On: April 19th, 2010]
- The Planet @ ad:tech SF [Last Updated On: April 22nd, 2010] [Originally Added On: April 22nd, 2010]
- ad:tech Server Challenge [Last Updated On: April 22nd, 2010] [Originally Added On: April 22nd, 2010]
- ad:tech Panel: Developing Communities Online [Last Updated On: April 23rd, 2010] [Originally Added On: April 23rd, 2010]
- The Planet @ Interop Las Vegas [Last Updated On: April 27th, 2010] [Originally Added On: April 27th, 2010]
- Overflowing With Value: 10TB is Back! [Last Updated On: April 28th, 2010] [Originally Added On: April 28th, 2010]
- The Cloud is NOT the Revolution [Last Updated On: April 29th, 2010] [Originally Added On: April 29th, 2010]
- The Importance of Orbit 2.0 [Last Updated On: May 5th, 2010] [Originally Added On: May 5th, 2010]
- The Planet @ Web 2.0 Expo [Last Updated On: May 6th, 2010] [Originally Added On: May 6th, 2010]