Tuesday, 23 October 2012

Ubuntu - What the hell is SUDO?

Ubuntu - What the hell is SUDO?

If you are unfamiliar with unix systems you may never have heard of "sudo" or the powers of this command on your system. It stands for Super User DO and temporarily grants you privileges normally reserved for a superuser or root.

When do I use it?

When using the terminal there are some commands that are reserved for many reasons that include system breaking potential or system compromise and cannot be executed under normal circumstances. These actions may include editing system files and settings or installing new applications.

How do I use it?

An example familiar to some is when you install an application.  Here I try to install amarok music player:
ubuntu@ubuntu:~$ apt-get install amarok
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
So the system has decided to block me from installing but I want to continue so I prefix my command with sudo.
ubuntu@ubuntu:~$ sudo apt-get install amarok
[sudo] password for ubuntu: 
It will now proceed with the installation when I supply my password. Note that I require my password and not the password for a superuser.

In summary

Beginners: When you get a pop-up asking for your password (like when you install software from the Software Center) you are invoking the SUDO command, basically telling the system that you are sure you want to proceed.

Intermediate: SUDO is a command you use in terminal where you grant yourself temporary superuser privileges. Proceed with caution!

Advanced: Why are you reading this?




Ubuntu - What the hell is Terminal?

Ubuntu - What the hell is Terminal?

Beginners explanation of terminal in Ubuntu.

You may have heard of terminal or seen lines of scary code or instructions that look like something from a Hollywood blockbuster. To the uninitiated it looks alien and something that a normal user would never need or indeed something you shouldn't even see.

Look scary? Nope, it's just Ubuntu during a simple update
Put simply, terminal is a text based way of interacting with your system. Commands that are normally invoked by your system when you click a button can be entered as a text command. I can install an application, move a file, mount a drive etc. if I know the correct command.

The reason why it is used by so many is easy - Speed and ease of use.

Now that statement might seem counterintuitve to many but give me two minutes and I will explain.

Sample Case

Let's just take an example where I would like to install my favourite music player Amarok. To do this normally I have to launch my Launcher or Dash, Open Software Center, conduct a search for Amarok,  find, click install and finally enter my password. 

The terminal method is as follows:
sudo apt-get install amarok
and type my password. Done.

Worth It?

Now this is just a simple case and it might not justify learning or understanding terminal and for many users it may not be. If you are happy browsing the web, listening to music and watching video then there may never be a time where you need terminal. To others however, just getting a glimpse under the hood is not enough. When you delve into terminal you find the power and speed that simply cannot be had through graphical interfaces.

See our terminal commands list to see the actions that keep terminal users coming back.




 

Ubuntu - Super Key Keyboard Shorcuts

Super Key Keyboard shortcuts for Ubuntu

The Super Key (or Windows Key) on your keyboard can be used to make your life a whole lot easier when working with Ubuntu.  Here are just a few for you to try out. 

Window Organisation

SK + S = Show workspaces
SK + W = Spread windows and show them on screen

Super Key - Dash

SK = Opens Dash
SK + A = Open Dash in Applications Pane
SK + F = Open Dash in Files and Folders Pane
SK + M  = Open Dash in Music Pane
SK + V  = Open Dash in Video Pane

Super Key - Launcher

SK + TAB = Switch though applications via Launcher icons
SK + 1 - 9 = Open or switch to application via position in Launcher

Super Key

SK + T = Opens Trash