What's the best way to learn commands ? Follow some books or some sites..
Well, these are definitely some ways but there is also one more option available.

Let's see how it works..

WHAT IS CLI COMPANION ?

CLI Companion is a Terminal that lets you store commands and create a 'command dictionary'.CLI Companion is a tool to store and run Terminal commands from a GUI. People unfamiliar with the Terminal will find CLI Companion a useful way to become acquainted with the Terminal and unlock its potential. Experienced users can use CLI Companion to store their extensive list of commands in a searchable list.

HOW TO INSTALL ?

Add the PPA first:

sudo add-apt-repository ppa:clicompanion-devs/clicompanion-nightlies


Now, execute below mentioned commands:

sudo apt-get update
sudo apt-get install clicompanion


HOW IT WORKS ?

Open your terminal and type :

clicompanion

A window will pop up, just like below mentioned screenshot:


As you can see bunch of commands are already there. You don't need to remember anything. Just select the command and execute it.


Learn ! Learn ! and Learn !!
Suppose, you have installed several packages through PPA and now, you want to know what are those packages ?You may want to uninstall some of those packages.You need not to run any command for this. Our Ubuntu Software Center provides an awesome solution for this problem.

HOW TO CHECK ALL THE PACKAGES?

Open Software Center.

Go to Installed menu and click on the icon( downward arrow).


Software Center stores the softwares in different categories. You can all the PPA packages here after the purchase option.


You can click on any of the packages, get the information or you can easily remove it. Just click on the remove button.




Simple !!!

If you want to replace your default terminal with some new terminal then you have a lot of options as mentioned below:

Terminator:

Description:

Multiple GNOME terminals in one window.Terminator is a little project to produce an efficient way of filling a large area of screen space with terminals.
The user can have multiple terminals in one window and use key bindings to switch between them. See the manpage for details.

Homepage: Visit here for more info !!

Installation:

Open your terminal and type:

sudo apt-get install terminator



For the latest version, add the PPA:

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Guake:

Description:

Drop-down terminal for GNOME Desktop Environment.Guake is a drop-down terminal for GNOME Desktop Environment, so you just need to press a key to invoke him, and press again to hide.Guake supports hotkeys, tabs, background transparent, etc.

Installation:

Open your terminal and type:

sudo apt-get install guake

Once it is installed, Go to Dash-> Type Guake

Now, press F12 to invoke and hide this awesome terminal.



It's transparent by default !!!

Will add some more in the next post of this series.

Stay tuned !!



This post will be a bit short but will be very useful.Today, I am going to introduce a powerful thing: bash-completion

HOW TO INSTALL?

In most of the system, it is already installed. But first check whether it installed in your system or not.

Execute this command in terminal:

sudo apt-get install bash-completion


If you face an error like mentioned in the above screenshot, you just have to run a command as suggested by terminal.

HOW TO USE IT?

It gives you a powerful option.

Example:

Like , if you want to install any software :

sudo apt-get install steam

Don't hit Enter. Press Tab ( don't freak out if it doesn't work in one attempt).


You will see bunch of options here. Now, you can use any of the options here.

Enjoy !!


What is PlayOnLinux?

PlayOnLinux is a piece of software which allows you to easily install and use numerous games and apps designed to run with Microsoft® Windows®.
Few games are compatible with GNU/Linux at the moment and it certainly is a factor preventing the migration to this system. PlayOnLinux brings a cost-free, accessible and efficient solution to this problem.

What are the features?

You don't have to own a Windows® license to use PlayOnLinux.
PlayOnLinux is based on Wine, and so profits from all its features yet it keeps the user from having to deal with its complexity.
PlayOnLinux is free software.
PlayOnLinux uses Bash and Python.

How to install ?

Open your terminal and execute :

sudo apt-get install playonlinux


Once it is installed, you can fire this application by just writing playonlinux on terminal.


Just press OK if you see something like this.

You will be greeted with this screen.


Next screen will be something like this..


Click on the Install button.


 Just select the application which you want to install.


 Click the Next button.


That's it !!


There is one more alternative of Ubuntu Software Center, known as Deepin Software Center and this is awesome !!


It provides many other options which others don't provide.Like, it has an option of changing the skin...



You have to add PPA for this:

sudo add-apt-repository  ppa:noobslab/deepin-sc


sudo apt-get update
sudo apt-get install deepin-softeare-center


I know the size is a bit large but it is worth of the interface and features that it provides.

It also provides many other options like:
Hot Apps
Topics
Download Ranks




Suppose, you have some files in some folders and you want to know the name of the files ending with some specific extension(.txt, .pdf etc..). There is a simple way to get the name of the files using echo command..

Let's see how it works..

Open your terminal.

echo *.txt (or any other extension)


In my case , there are the txt files in home folder.

So, How to do it in Perl ?

This will be the source code of your perl file :


Like echo, there is a magical command in perl : glob

I don't want terminal kind of output. So, I modified my code for better display. (Just a for loop nothing else...)


We did it !!
First of all , We will create some test files:

Open your terminal and type this:

touch one.txt two.txt three.txt

Now, the terminal command to delete these files:

rm one.txt two.txt three.txt


How to do same thing in Perl ?

Open terminal.

Execute : gedit delete_file.pl

Just write:

#!/usr/bin/perl
unlink "one.txt" "two.txt" "three.txt";

Save and close the file.

Now, make this file executable using this command:

chmod a+x delete_file.pl



Execute it :

./delete_file.pl

As unlink returns the number of deleted files, we can modify our code a bit and be sure that files are deleted:

#!/usr/bin/perl
my $result= unlink "one.txt" "two.txt" "three.txt";
print "I have just deleted $result files";



I always say terminal is a powerful tool. You can do a lot of things in it. There are some packages available in the ubuntu's  repositories which will convert your terminal into a web browser. It won't be glossy and glamorous but will be very useful..

Let's explore some packages here...

Lynx :

As I always say, you can always make yourself aware of anything by excuting man command in terminal.

man lynx

Lynx  is  a fully-featured World Wide Web (WWW) client for users running cursor-addressable, character-cell display devices(e.g., vt100 terminals, vt100 emulators running on Windows 95/NT or Macintoshes, or any other  "curses-oriented"  display).It  will display hypertext markup language (HTML) documents containing links to files residing on the local system, as well as files residing on remote systems running Gopher, HTTP, FTP, WAIS, and NNTP servers.  Current versions  of  Lynx  run  on Unix, VMS, Windows 95/NT, 386DOS and OS/2 EMX.

Install lynx by executing:

sudo apt-get install lynx


How it looks?

Just open your terminal and write:

lynx


 You may find it a bit difficult in first look. Options are present at the bottom of the screen.Just give yourself some time and enjoy !!

Elinks:

I find it simplest and the best.

ELinks is a text mode WWW browser, supporting colors, table rendering, background downloading, menu driven configuration interface, tabbed browsing and slim code.Frames are supported. You can have different file formats associated with external viewers. mailto: and telnet: are supported via external clients.ELinks can handle both local files and remote URLs. The main supported remote URL protocols are HTTP, HTTPS (with SSL support compiled in) and FTP. Additional protocol support exists for BitTorrent finger, Gopher, SMB and NNTP.
You have to follow the same step :

sudo apt-get install elinks


So, once the installation is done.You just have to enter the url of a site :


You may have faced this issue while downloading some package using apt-get. Well, there is very simple and basic step to fix this problem.

Suppose, you executed a command to install particular package ...

sudo apt-get install (package name)

But , got below mentioned error:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package
In this scenario, do this:

Go to Ubuntu Software Center ->Edit ->Software Sources


Make sure all the boxes are checked as shown in the above screenshot.

I hope this trick will be useful !!
We normally use a Gui tool to download torrent file but our powerful terminal also gives us a way to download torrent file without using any Gui tool.In today's post , I am going to cover one way here..

So, you need to install one package here...

Open your terminal.

Type and execute:

sudo apt-get install rtorrent


WHAT IS rtorrent?

rtorrent is a BitTorrent  client  for  ncurses,  using  the  libtorrent library.  The  client  and  library  is written in C++ with emphasis on speed and efficiency, while delivering  equivalent  features  to  those found in GUI based clients in an ncurses client.Most  of  the  options below have their own default unit in addition to supporting B, K, M and G suffixes.
HOW TO USE?

 Execute this command in terminal:

rtorrent -help


Done !!
The one benefit of open source softwares is that you not only use the application but also can customize it according to your whim.But to customize anything , first of all you need the source code of application.

So, How to download source code...?

This is very simple.

Open your terminal.

Type and execute:

sudo apt-get source ( application name )


Just go to your home directory and grab the code !!!

If you face a problem like this while downloading the source code:

$ apt-get source rhythmbox
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to find a source package for rhythmbox

In this scenario , you have to do some settings:

Open Software Center.

Go to Edit -> Software Sources


Check for the Download from option..it should be server from United State..


Done !!
There are more than one ways to create empty file using terminal. I am going to explain some of them here...

touch command:

Description:

Update  the  access  and modification times of each FILE to the current time.
A FILE argument that does not exist is created empty, unless -c  or  -h is supplied.

Open terminal and type:

touch (filename)



cat command:

Description:

Concatenate FILE(s), or standard input, to standard output.

Type this in terminal:

cat /dev/null > file1.txt


All these files will be created in home directory.You can also mention the particular directory in which you want to create your file...

What is GIT ?

In simple words , Git is a place where you can upload your code. Git is used by many open source developers to upload their code.Because, it is an open source platform , it doesn't charge anything.Git was initially designed and developed by Linus Torvald in 2005.

For more information, please visit here.

HOW TO INSTALL IN UBUNTU ?

Open your terminal.

sudo apt-get install git


 It is already installed in my system.

HOW TO SET UP GIT ?

Open your terminal.

Execute below mentioned commands

git config --global user.name
git config --global user.email


 You can check your settings:

 git config --list


These are just the initial things about Git ..There are much more in it....
Will try to cover more in my next posts...

Sometimes , you just don't want to execute the commands one by one. You just wish of a shortcut which can run bulk of commands.It is just like opening a terminal using CTRL+ALT+T keys..

So, how to do it?

First of all, you have to install a package using Terminal.

Open your terminal and type this:

sudo apt-get install xbindkeys


Once this is done, you have to create a file using below mentioned commands:

touch .xbindkeysrc
gedit  .xbindkeysrc


Put your commands here in the below mentioned format and also the shortcut which you want to use to execute your commands.


To run your newly created shortcut, first write this in terminal :

xbindkeys

Now, press your shortcut.( in my case CTRL+1)

As soon as I press this, a window pops us like this:


Done !!!
Terminal commands are not always to complete geeky things. We can also do some fun stuffs using these commands...

So, What we have in the basket today !!

There is a simple package available in Ubuntu which can convert your text into banner format... confused ??

Ok, see here...

First, open your terminal and execute this command:

sudo apt-get install sysvbanner


So, what it does ?

Execute this command in the terminal:

man banner


As you can see in the Description:
It prints out the first 10 characters of text in large letter.

Now, just see this command in action:

Type below mentioned command in terminal:

banner <10 characters="" string="">


Happy bannering !!
© 2015 Techie's House. Designed by Bloggertheme9