Tuesday, April 12, 2011

Linux #1: Getting Started

Ok, so I determined that there is WAY too much shit in Ubuntu to put into one tutorial... it would be too long and time consuming. Therefore, I decided to break down the Linux tutorial into several different posts. This is good for me, however I feel it isn't the best route to go in terms of showing off the badassness of Linux right away... people may get caught up on a less-amazing, more-technical tutorial that really holds no interest, just necessary info... with this said, please wait until I have 5-6 Linux posts up, read them all, and then determine if you like Linux and give it a shot. Ok, so here we go!...
  --------------------  Setting up Keyboard Shortcuts   --------------------
Ok, so you have Ubuntu installed and your just staring at a blank desktop wondering what to do next and where to go. The first thing I do upon a fresh install of Linux is to create a quick-and-easy button combination to bring up a terminal (command prompt). As many of you know or may have guessed, Linux is very command-line driven. Really though, do Not let this scare you... you can get by using Linux without ever using command line tasks... but using the terminal to complete tasks is really what makes Linux extremely powerful and versatile as an Operating System. Anyways, to make a shortcut, do the following:
// Look at the top left corner of the screen
// There should be three things you can click... "Applications", "Places", and "System"
// Go to System->Preferences->Keyboard-Shortcuts
// Less than halfway down the list you'll see "Run a terminal"
// Double click the box/empty space to the right of where it says that
// Press a key combination that you would like to fire up a terminal
// Personally, I use SHIFT+CNTRL+A... close, quick, and easy.
// Click Close to close that window
// Press your unique keyboard shortcut and launch a terminal

   --------------------  Downloading New Programs   --------------------
Ubuntu is a very security conscious operating system... most of the programs you install onto Ubuntu you will not be going to a website, downloading, and then installing. Instead, the Ubuntu community has a repository of programs ready to be downloaded and installed. This repository is for convenience and security purposes. Think of it as the equivalent of Apple's App-Store, but less monopolistic. And similarly, like an iPhone, you can add third-party repositories so that you have many many more programs to choose from to download and install. However, this is not recommended since third-party repositories have not been thoroughly reviewed and inspected to insure no files are malicious or have been infected... I recommend not adding any third-party repositories in Ubuntu.
You can install programs through a GUI (Graphical User Interface) by going to:
// Applications->Ubuntu Software Center
and then searching for new programs and seeing which are rated best and most used. This is nice for finding new, popular programs, but the real beauty of Ubuntu shines through for users like myself, and many others, who already know Exactly what they want installed on their machine, and want to do it as fast as possible. To install programs the badass AND fast way, do the following:
// Fire up a terminal
// type "sudo apt-get install [program_name]" without quotes and with the name of the program you want to install inside the brackets
// you will be prompted to type in your password
// As you type your password, no letters appear on the screen, this is normal. Just type in your password and hit enter
// If the program is found in the repository, it will come back and tell you how much space it will take to install said program, and as you if you want to continue (Y/n?). Type "y", hit enter, and let it complete the install.
// Nothing else needs to be done, the program installed and should be able to be found by searching through the "Applications" tab.

****Keep in mind you must know the INSTALL name, not just the name... for example, when installing Virtual Box, one must type "sudo apt-get install virutalbox-ose" rather than just "virtualbox"****

Here are some programs I recommend you install, copy past if you want to install them:
~$>sudo apt-get install deluge                // GUI torrent client
~$>sudo apt-get install virtualbox-ose   // Virtual Machine client
~$>sudo apt-get install vlc                     // best media player ever
~$>sudo apt-get install pidgin               // IM client (AIM/Yahoo/MSN)
~$>sudo apt-get install xchat                // IRC client (like mIRC for Windows)
Also, I believe you can install things all at once just by putting a space in between them... ex.) "sudo apt-get install xchat vlc" will install xchat And VLC, prompting you to respond Y/N for one after the other has finished
 =============== Simple Terminal Commands =============
  --------------------------------- List Contents of a Directory  ---------------------------------- 

~$>ls                  // lists all files and folders in the current directory
~$>ls -la             // lists all files and folders (including hidden) and more info

 ---------------- Changing Directories and Navigating through folders ---------------

I am going to list the different ways to use the cd (change directory) command, and the information before the ~$> is the current directory you are currently in... blank means root, as far back as you can go (like My Computer in Windows), and ~ means "home" folder which will contain one folder with Your user name you logged in with (defined as user_name throughout this tutorial). Pay attention to the current directory after each operation to understand what it is doing.

~$>cd /home/user_name/Desktop             //changes directory to one specified
~/Desktop$>cd                                          //JUST "cd" goes to /home/user_name/
~$>cd /                            // "cd /" will go to ROOT folder, can't go back further
$>ls                                 // "ls" lists files/folders... just for figuring out where
etc                                   // we  might want to go for the sake of this example
mnt  ....... etc, etc, etc... few more folders... lets go to /etc/apt/...
$>cd /ept/apt/
/etc/apt$>cd ..                   // "cd .." navigates to parent directory (back one folder)
/etc$>cd                             // navigate to /home/user_name/ folder
~$>cd ..                             // navigate to parent directory (which will be home)
/home$>cd ..                      // navigate to parent directory again (root)
$> cd home                        // join /home/ folder
/home$> cd user_name       // go to /home/user_name/
~$>exit           // exits... and remember... ~$> is same as /home/user_name$>

  -----------------------------------  Making Directories  -------------------------------------------

~$>mkdir pR0n    // will make folder pR0n in current directory
~$>mkdir /home/user_name/Desktop    // will make folder pR0n on Desktop

--------------------------------  Practice, Practice, Practice!   -----------------------------------
Practice navigating your way in and out of folders and paths to get an understanding of where things are stored in Ubuntu... Use the "ls" command often so you can see what folders are available for you to navigate into. You can look into folders other than the one you are currently in as well... Lets say I am AT root, / , and want to see what is IN my Downloads folder, I can type "ls /home/user_name/Downloads" and it will print out a list of files and folders in my Downloads folder... and if you want to then navigate straight there, type "cd /home/user_name/Downloads", and now you are there! Now a simple "ls" without any path with print out the same thing as the first time because you are now telling it to print out a list from your current directory which is now your Downloads folder.
There is much much more on the way... and Eventually this will evolve into hacking tutorials, I promise... I just want everyone to have a chance to get on the same page. Thank you all! Please comment with any questions or criticism!


  1. I don't know what i'd do without your help, thanks a lot!

  2. Don't know too much about Ubuntu, but the repository thing sounds alright. For free, I guess it's not bad

  3. i will definitely consider this in the future! thanks for this post

  4. My friend just read this post over my shoulder and told me to tell you "thanks!". He just got into linux and was lost.

  5. i am RHCE
    following you
    nice blog, great info....

  6. This was insanely helpful honestlty, thanks dude.

  7. If I ever feel like installing I'll check this.

  8. Sweet. I should get to linux.

  9. Thanks for explaining basics! I would have been really behind if you started with advanced stuff

  10. Haha damn, i'm sorry, but that was a little over my head. I have a friend who uses Linux so i'm sure he could help me out.

  11. Just what Im looking for thanks.