Category Archives: Tips and Tricks

Terminal Commands are cool and very handy sometimes (even for common users who don’t like terminal), also useful in learning some cool stuffs about Ubuntu or GNU/Linux in general (so it’s also good for learners).

I’ve prepared a list of few terminal commands – that anyone can learn and master (in couple of minutes), in order to enjoy a better experience with Ubuntu or other Linux distributions (and don’t worry about – the Ubuntu version you are using such as – 12.04 LTS – “Precise Pangolin” or 11.10 or may be the upcoming one – 12.10, because it doesn’t change often unlike the other things in Ubuntu :), same for Ubuntu derivatives such as Linux Mint 13(Maya)).

Top 17 commands for Ubuntu Beginners

Basics GNU/Linux Commands

#1. ls : list directory contents

ls

If you want to see hidden files/directories (beginning with dot.), the use -a flag.

ls -a

Check the manual for more detail (man ls).

#2. cd : Change Directory

cd ../
cd /home/Desktop

Remember,

. represents the current directory

.. represents the parent directory

~ represents the home directory (of the user)

#3. pwd : print the current/working directory

pwd
/home/Desktop/scripts

#4. mkdir : make/create directory.

mkdir funny_stuffs

#5. rm : remove/delete file/directory

rm useless.sh

NOTE : it removes directories only if it’s empty, unless you specify -f flag for force deletion. But you must be careful with the arguments such as -r, -f. (-rf is very dangerous).

#6. sudo : superuser do, to gain root privilege

e.g

sudo apt-get install gnome-shell

Then enter your user account password, and you would be able to do administrative tasks like root. So if you’re getting any permission error using a command, then adding sudo as a prefix, might help.

#7. mv : rename or move a file/directory

mv file1 ~/Downloads/Archive/

the above command will move the file from the current directory to target directory.

mv logo_2.jpg new_logo.jpg

it will rename the file to new_logo.jpg.

#8. cat : View File contents

cat install.log

#9. man : A Reference manual for utils/commands/programs

e.g if you want to know more about rm command, then type –

man rm

#10. cp : Copy Files/Directories

cp movie_name.mp4 ~/Downloads/movies/

The above command will copy the movie_name.mp4 to the specified directory.

#11. wget : Download files from server

GNU Wget or wget is very handy in downloading stuffs from internet, over the command line.

wget url_of_the_content

#12. gksudo : Run GUI Application with Root privilege

gksudo nautilus

The above command will open nautilus with root privilege. It’s just like sudo, but in GUI mode.

#13. shutdown : To shutdown the computer from terminal

shutdown -h

where time can be 0 if you want to shutdown now or specify the exact time such as 10:30.

#14. restart : Restart the computer

restart

Package Management

These are Ubuntu Specific commands. It Requires root privilege, so just add the sudo prefix before each command (it will ask for the user password and you’re done!).

#15. apt-get : Command Line Tool for handling packages
There are various options such as

Ubuntu is very simple and fun to use but absolute beginners or newbies (or Windows/Mac users) often feel difficulties, even in switching a single application; In case of operating system ? it is like – moving to an alien planet.

Thanks to Ubuntu Community for writing a getting started guide for beginners. It’s a free Ubuntu manual for everyone, and of course it’s very helpful for beginners who are totally strange to Ubuntu. It explains from basic concepts to setting up printers and also includes troubleshooting, with full of sccreenshots. Even if you’re not an absolute beginner, you can still find it useful sometimes.

The New version of manual has been released, so you can download it for Ubuntu 12.04 LTS.

If you’re using Ubuntu 12.04 LTS, and of-course it’s very fast But you can still optimize the applications by reducing the time it takes to start.

Although, this post explains only about start-up time for applications not the boot time or the overall speed of your computer (although there’s some advice you can follow to enjoy better performance in Ubuntu 12.04, not now, checkout upcoming posts ).

Reducing Startup Time using Preload utility

What is preload ?

it’s a utility application that does some pre-processing tasks such as linking, loading and other dependencies issues (it’s not easy because of the centralized dependency management). So before you start your favorite application, it might have already done some pre-processing task and finally – it would appear faster to you.

Install Preload in Ubuntu

To install preload module, execute the command –

sudo apt-get install preload

That’s All, now it will start running in background and it will try to decrease the load time for most commonly used appl

Linux Mint 13 (a.k.a Maya) is out and it’s rocking the GNU/Linux desktop world with a lot of innovative features and cool stuffs. If you haven’t tried it yet – then you must check it out. Anyway, this post is aimed to help beginners who have just installed a fresh copy of Linux Mint 13 – Cinnamon or Mate Edition (most of the things seems to be same but MATE edition is more stable and mature while Cinnamon is cool, new and exciting).

Since Linux Mint is one of the most beginner friendly GNU/Linux distribution so I assume that you don’t have any previous experience with any GNU/Linux distro, on the other hand if you’re familier with Ubuntu or Debian or other GNU/Linux distribution then most of the things would be straight-forward and easy in Linux Mint 13 so you wouldn’t even need this getting started tips (but it might be helpful in some case).

Anyway, if you’ve installed Linux Mint 13 successfully then it’s the time to start using it with its unlimited potential (and of course the fun).

6 things to do after installing Linux mint 13

#1. Update

To update your system, simply open update manager or just execute these two commands in a terminal (hit Ctrl+alt+t) –

sudo apt-get update
sudo apt-get upgrade

Sometimes, you may have to restart your computer to complete the update process.

#2. Install Some necessary programs

After a fresh installation, you may need to install some necessary audio/video codecs or libraries (some proprietary programs, if a good open source equivalent program is not available) or flash player or libraries for archiving or extracting various file types such as zip, rar, tar etc. To install most of those above utilities simply execute the command –

sudo apt-get install ubuntu-restricted-extras

Other programs, those are absolutely necessary, includes – drivers for

graphics/video card

printer/scanner

sound card

wireless card

webcam etc.

Depending on the devices you use – install the appropriate driver/program. e.g for Webcam, install cheese –

sudo apt-get install cheese

#3. Install your favorite Applications/Softwares

Default applications in Linux Mint are good but it’s not necessary that it will include your most favorite apps. If that’s the case then Open Software Manager or Synaptic Package Manager to search and install your favorite applications or you can install from terminal.

#4. Try some new applications

Are you getting bored with the applications you’ve been using from years, want to try something new, Software Manager is full of great, new and exciting applications. Music players, utilities, programming tools, image editors, games and a lot of new apps are there. Give it a try – most of them are free and it won’t hurt much if it doesn’t work.

#5. Explore new features and Customize it as you want!

Linux Mint is a free software, you are free to explore, learn, modify and share. The only limit is your imagination.

Try Cinnamon Settings

If you’re using the Cinnamon edition then use ‘Cinnamon Settings’ to customize the various settings such as Themes, Fonts, Icons, Applets, Effects, Panel, Desktop etc. It’s a simple utility, installed by default in Linux Mint 13 Maya (Cinnamon Edition). Although, it looks little similar to Gnome Tweak Tool but it’s much simple to use.

Changing/Installing Themes In Cinnamon Settings

Change Desktop Settings using Cinnamon Settings

If you love experiments then you would automatically lot a new stuffs everyday, additionally these posts might help a bit –

#6. RLE (Relax, Learn and Enjoy)

There are lot of features, lot of apps and a lot of things that you want to tweak but don’t get lost in them, after all, there is some reason, some purpose that brings you to the computer. Linux Mint or any GNU/Linux distribution requires little patience and time – to get things done as you want. So just Relax, Learn and Enjoy, with a lot of fun

Ubuntu 12.04 (Precise Pangolin) is the LTS (Long Term Support) release and it’s a lot different from the last LTS (I mean the 10.04, which was based on Gnome 2.3). A lot of things has changed – including the Window Manager – Now it’s Unity (The default Desktop), based on Gnome 3. Anyway, it seems to be more beginner friendly – and that’s the reason why more number of people are migrating from Windows to GNU/Linux based operating systems such as Ubuntu, Linux Mint, etc.

So, if you’ve just installed the new version of Ubuntu i.e 12.04 LTS on your computer (if you got stuck during the installation process then go through my previous post about – installing Ubuntu 12.04) – then you may need to install some most basic applications/plugins/libraries in order to perform some common tasks such as watching videos, surfing websites (with multimedia content) or listening to your music (mp3) collection.

If you’re wondering – why doesn’t Ubuntu does that by default then you should know that Ubuntu or any other GNU/Linux distributions follow Configuration over Convention principle – there are lot of ways to do the same thing – so they leave it on the users choice; although Ubuntu does ship some cools applications by default – such as Mozilla Firefox, Thunderbird, Media Player, Bash, Ubuntu Software Center, Shotwell (Photo Manager), Document Viewer (for reading pdf file), Nautilus (File Manager) – most of the applications comes along with the package of Gnome Desktop. There are some licensing problem too, that’s why they can’t ship Ubuntu with proprietary plugins/codecs.

Few months ago (at the time of Ubuntu 11.10 release), I wrote the article – 10 things to do after installing Ubuntu 11.10 – it was very popular (and a lot of beginners appreciated that post). So this article is basically an update version of that, of course for Ubuntu 12.04. Most of the things haven’t changed much, but I wanted to make things more easier by putting together – all the simple things you need to do after a fresh installation (this time – it’s 12.04). So I suppose, it will be helpful for beginner Ubuntu users specially those who are trying it for the first time.

Top 10 things to do after installing Ubuntu 12.04

#1. Update Your System

It’s the first thing to do, just after the installation, to update the repository cache and packages you have installed (by default or custom (if you did)). You can start the update manager (and click on ‘install update’)

or just open a terminal/shell (Ctrl+Alt+t) and execute these commands to get the task done –

sudo apt-get update
sudo apt-get upgrade

#2. Install Proprietary stuffs (Plugins/Codecs/Libraries)

To install the most commonly required plugins and codecs/libraries, just install the ubuntu-restricted-extras package, because most popular codecs/plugins are bundled together in this meta package. It has

Adobe Flash Plugin

GStreamer ffmpeg video plugin

Fluendo mp3 decoder

unarchiver for .rar files

Execute the following command to install the proprietary stuffs (described above) –

sudo apt-get install ubuntu-restricted-extras

For Playing Encrypted DVD

If you want to play encrypted DVD then you should also install CSS (Content Scramble System) decoder/unscrambler. The free software library libdvdcss2 is very popular for reading the encrypted DVDs.

#3. Install Additional (missing/required) drivers

For Graphics/Video card

If you are using any graphics/video card or sound card or webcam then you must install the appropriate drivers/softwares for that. Ubuntu 12.04 can automatically detect graphics card and a pop-up window may appear with the suggestion but you need to make sure that you’re installing the right driver for the device. In the snapshot (below) – you can see I need to install Nvidia proprietary drivers in order to enjoy the power of graphics card.

Sometimes even it won’t be detected automatically, in that case you can install manually (go to System Settings -> Additional Drivers). You need to do the same thing for sound card, otherwise you may be facing some sort of performance problem or instability.

Driver for Webcam

To use webcam, install cheese webcam booth. It’s a good software for webcam and it has some nice features like – cool funky effects which will increase the fun while taking pictures or recording videos on webcam. Using Cheese is simple to use – just select the mode (video, photo or burst) and start capturing photos/videos.

To Install Cheese, execute the command –

sudo apt-get install cheese

Drivers for Printer/Scanner

Go to System Settings -> Printing -> Add, then select your printer and follow the instruction and the driver will be installed within a couple of clicks. If you’re still not sure how?, then checkout this detailed step by step instruction on installing Printer in Ubuntu 12.04, I’ve written earlier.

#4. Install Gnome Shell and Gnome Tweak Tool

Ubuntu comes with Unity interface, by default. If you don’t like Unity for any reason – then you must try Gnome Shell. Although, both of the desktops are based on the Core – GNOME 3 but Gnome Shell is the default interface for Gnome 3 (the latest version of Gnome introduced months ago). Gnome Shell has lot of cool and exciting features. You don’t need to remove unity in order to use Gnome Shell – just install Gnome Shell –

sudo apt-get install gnome-shell

and next when you log in, select Gnome as the desktop. It will automatically remember the option.

Customizing Gnome 3 has become weird as compare to the old version of Gnome (i.e 2.3) but thanks to Gnome-Tweak-Tool which has made customization of Gnome shell/3 a lot easier.

Install Gnome Tweak Tool / Advanced Gnome 3 Settings

sudo apt-get install gnome-tweak-tool

Now, you can tweak a lot of advanced settings like themes, icons, fonts, windows behavior, desktop – icons etc just in a couple of clicks.

If you don’t like Gnome Shell then there are other options too such as KDE Desktop or OpenBox (Lightweight and Fast) or XFCE Desktop (I haven’t tried yet, on 12.04 but seems to be a good option, if you don’t like these new fancy effects/changes in Gnome/KDE – it’s simple and easy – optimized for simplicity ‘n’ productivity).

#5. Install Synaptic Package Manager

Even though Ubuntu Software Center has improved a lot but it seems cluttered (and slow), I always find Synaptic Package Manager – easier and faster so if you miss it on latest versions of Ubuntu (including 12.04) then it’s time to install it now. It has been removed from the default applications but it’s there in package repository so open a terminal and execute –

sudo apt-get install synaptic

#6. Install VLC Media Player

All in One Media player – The VLC Player, is a must have application on Ubuntu 12.04! The default media player in Ubuntu 12.04 is also cool but there is no reason why we shouldn’t install VLC. It can play a variety of multimedia formats that no other media players can. VLC version 2.0 is the latest one, with lot of new features, and in Ubuntu 12.04 – it’s included by default in the package repository (so you don’t need to add any external PPA).

sudo apt-get install vlc

#7. Install Pidgin

Pidgin is a simple and easy to use Chat client. It can connect to all the most popular Instant Messaging network/services such as Google Talk, IRC, MSN, Yahoo, AIM, ICQ, XMPP etc, so it’s also known as Universal Chat Client. The latest release is v 2.10 (for Ubuntu).

To install Pidgin, execute –

sudo apt-get install pidgin

#8. Install GIMP Image Editor

Image editing/creating program is a must have application, on Ubuntu 12.04 – you have many options such as GIMP, Pinta etc. It has lot of advanced features and it is almost equivalent to Adobe Photoshop.

Installing GIMP

sudo apt-get install gimp

GIMP is very good and it has lot of complex features but it may be overkill for very simple tasks, specifically if you are new to image editing. In that case – you should try Pinta – another free image editing program that is very simple and easy to use!

Installing Pinta

sudo apt-get install pinta

#9. Install Google Chrome or Chromium

Firefox is cool but even if Mozilla Firefox is your favorite web browser it’s good to have a good alternative web browser. Chrome is a simple and fast web browser – and it comes along with the proprietary stuffs. You can als try Chromium – which is the base project of Chrome, and it’s already there in package repository/software center.

#10. Backup Plan

Backup is critically required in every situation, specially in Ubuntu :). So it’s a very good idea to have everything (at least critical files) backed up. Ubuntu 12.04 has a good backup application installed by default called – Deja Dup. You just need to configure it for frequency, target directory (and of course the directories you don’t want to backup), and the backup location. There are many options for backup location –

Ubuntu One – the default one and probably the easiest way to backup files on Ubuntu (you can access your files remotely from anywhere – the web interface or computer or from your Android Phone), you will get 5GB of free space. It nicely integrates with deja dup.

Dropbox – similar to Ubuntu One – but if you’ve been using it already then this is also a good option.

Custom (Amazon S3 or something else) – if any of the above option doesn’t suite you well then this is the option for you. You can easily configure Deja dup to upload backup files to AWS s3 or any custom server.

Update #1 : I’ve written a simple shell script to automate the installation process of most important programs that you often need to install after a fresh install of Ubuntu. Download this programs-installer.sh script, extract it and execute it –

sudo chmod +x programs-installer.sh
./programs-installer.sh

or you could drop the script file at terminal. You may need to enter password once, after that it will install most of the useful programs and update the system.