Subscribe to Penguin-man the computer guy

Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts

Wednesday, June 5, 2013

My First Impressions of Ubuntu 13.04 on an Acer Aspire 722

I have been an Ubuntu fan for several years now... my first Ubuntu system was a dual booted Ubuntu 10.04/Windows 7 system. After starting to use Ubuntu, I will never forget the increase in speed that I experienced compared to using a Windows system. Ubuntu was sooooo fast!!!

Well several releases later, Ubuntu has been getting heavier... it has been getting almost too slow to run effectively on my Acer Aspire One 722 netbook. I like having a lightweight netbook to carry around. They are portable, and flexible.
Acer Aspire One 722 netbook
Because of the trend that each release is heavier than the last, I was rather hesitant to upgrade. Tonight I decided to upgrade my machine. I was very impressed with how much faster 13.04 is then 12.10. I also noticed that the icon for the nautilus file manager icon was changed to this icon:
From the older Nautilus icon:
The icon I am indifferent to, but the speed that nautilus launches is so much faster now. This is a welcomed improvement. The HUD also has a new icon.

Updating to 13.04 from Ubuntu 12.04 or 12.10


 In Ubuntu, to do this I ran this in the terminal:

sudo apt-get update && sudo do-release-upgrade

After running this, expect to settle in for a while. Pop a movie in or something, the system does not need to be babysat but it does not take a lot of effort or experience. Put a movie in and put the computer on your lap. You will be prompted on occasion. When done restart your computer and enjoy Ubuntu 13.04. I think my system took about 90 min before being ready to restart.

My Acer Aspire One 722 desktop just after update to Ubuntu 13.04

Friday, May 31, 2013

Getting to Know the Linux Terminal and BASH

In my first post on Linux Commands, I gave a bunch of examples on various commands but I didn't really give much background about the Terminal, the terminal environment, and the scripting language. Today when we say we are using Linux Commands most people in the field will understand that we are referring to a specific kind of scripting language that works on UNIX-like environments; specifically, this usually means BASH commands and scripts. But what is BASH, a terminal, or a terminal emulator?

In short we should get a few basics straight. Geeks are sloppy so when we say terminal we usually mean terminal emulator. When we use the terminal, the commands we type are in BASH. BASH is a far which is a far more powerful language than DOS for Windows. Because BASH is a language, we can use it to make small programs and run them from a file.

Meet the friendly Gnome-terminal :)

The Terminal 

A terminal emulator is a program that you can use to interact with the operating system. The terminal uses text based commands and can read files to allow it to control the operating system. When using a terminal, remember that it goes by several different names including these names:
Terminal
Command Line
Command Prompt

In Ubuntu if you are running the Unity desktop (Default GUI for Ubuntu 11.10 and beyond I believe) the way to access the terminal for the first time is from the Heads Up Display (HUD). To access the HUD, press the Win key or clicking on the HUD icon with the mouse:
HUD icon button at top right had side of Unity Desktop
Once the HUD launcher opens type the name of the application in the command line; here we type "terminal". Notice that it is unnecessary to type the entire name.


Click on the terminal application. This will give you the default GNOME Terminal. Once you are using the default terminal, if you right click on the terminal icon you can lock it to the launcher... do this, if you are serious about Linux you will use the terminal all the time. Note, as seen in the picture below, if you right click on the top bar of the terminal you have more options.

Is the gnome terminal the only terminal available in Ubuntu? No, there is xterm and there is terminator; xterm is used in some light weight set ups. My preference is either the gnome terminal or terminator. I actually like terminator a lot and terminator has many more features than gnome terminal. One of these features is seen below:
Terminator can be split to show several terminals at once.
Terminal's window can be split into many segments that are each there own terminal. I do enough stuff on the terminal that this is useful at times. Of course the Gnome terminal allows tabs, but terminals split feature is far more useful. To install the Terminator terminal emulator run the following in a terminal:

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
For more information about terminator I like this article and the terminator home page. I have not used a Mac machine yet, but they too are UNIX based so you can install terminator on a Mac too.

        fink install terminator

Terminals vs. Terminal Emulators

A terminal emulator is a GUI based application; a terminal is the screen of an OS when the the GUI is not running. As we said above, geeks are often sloppy in how they talk and say run <x> in the terminal instead of being correct and saying  run <x> in the terminal emulator; so when we say terminal we usually mean terminal emulator and assume you understand. Because many servers don't have any GUI at all, we often use the "real" terminal in them, and using a terminal is much like a terminal emulator. If you are running Ubuntu, to leave the GUI and see a terminal use the keyboard shortcut cntr-alt-F1, F2, F3, F4, F5, or F6 and to return to the GUI run cntr-alt-F7. Fun, huh? It is actually a great way to rescue a crashed GUI.

BASH

Once you feel comfortable around the actual terminal itself, it is time to meet BASH. Bash is a Unix shell that was developed by the GNU project. The BASH shell replaces the Bourne Shell which in turn replaced the Thompson shell. The Bourne shell was developed in 1977 and BASH was released in June 1989. The Thompson shell that Bourne replaced was written by Ken Thompson in 1971. If your starting to realize that the BASH tradition goes back a ways, your right... it does!!! There is a ton of documentation online and I will not try to repeat that.

BASH syntax is pretty easy... the general syntax is:
        command [arguments] <file>

BASH has a few simple commands everyone should know... here are my basics
To list files, run ls:

        ls
        ls -l
        ls -a
To change directories, run cd:

     cd /media/flashdrive/anime
To change directories to home, run cd ~

    cd ~
To change directories to root, run cd /

     cd /

To change directories back one directory (towards root) run ..

     $..
To update your Ubuntu or Debian based system run:

     sudo apt-get update 
     sudo apt-get upgrade 

Or run this which does both...

    sudo apt-get update && sudo apt-get upgrade