Home –  How to
Category Archives: How to

How to make password visible in linux terminal

Whenever you need to execute a command with root privileges / with sudo – you have to enter password. One gets used to not see the password as he types but it can make few people uncomfortable while entering long and complex passwords. If one messes up one character, the whole password needs to be re-entered because we are just.. not sure. This stops now.

Today lets see a tweak that will make password asterisks visible as one types.

We are going to add “pwfeedback” in sudoers file and we will be good to go.

Launch terminal using Ctrl + Alt + T.

Run “sudo visudo” and enter password when prompted (This is the last time you won’t get to see the password asterisks while typing).

sudo visudo

sudo visudo

Note: By default, the file is opened with nano editor. The reason behind this is while saving the sudoers file, if the syntax is wrong, user will not be able to run any command using sudo or root privileges. With nano editor, syntax is checked upon saving. So it is always recommended to edit sudoers file via nano.

You will see sudoers file like one below. Using arrow keys, navigate to the end of line:

Defaults env_reset

2

We need to append this line with “,pwfeedback”. Result should look like this:

Defaults env_reset,pwfeedback

3

Save with Ctrl + X and then typing y when prompted. You will be prompted to enter a filename, press “Enter” to accept default.

4

Now close and re-launch command prompt to see if this worked. You’re welcome ;)
This is how it looks on my terminal:

5

Thank us by sharing this post.

How to install HTML Tidy in Linux

HTML Tidy is a tool for checking and cleaning up HTML source files. It is especially useful for finding and correcting errors in deeply nested HTML, or for making grotesque code legible once more.

Project URL, source code and executable downloads: http://tidy.sourceforge.net/

I installed it on CentOS 4.6 by following the below steps, it should work fine on any Linux distro

Step 1: Go to http://tidy.cvs.sourceforge.net/viewvc/tidy/tidy/ and click on “Download GNU tarball” at the bottom. This will download a file named `tidy.tar.gz`.

Step 2: Untar the file by below command

chankey@pathak:$ tar xvzf tidy.tar.gz

Step 3: Change directory to the generated folder

chankey@pathak:$ cd tidy

Step 4: Run the below commands

chankey@pathak:$ /bin/sh build/gnuauto/setup.sh
chankey@pathak:$ ./configure --prefix=/usr
chankey@pathak:$ make
chankey@pathak:$ make install

Step 5: Tidy has been installed successfully, you can check the version by

chankey@pathak:$ tidy -v

Output: HTML Tidy for Linux/x86 released on 25 March 2009

Also see

How to find Linux distribution name and version?

uname

unameSometimes we need to find out Linux distribution name and version of current installed Linux OS. Here is a tutorial addressing this problem.

There are three methods to find out Linux distribution and version:
1. /etc/*-release
2. lsb_release
3. /proc/version

Method 1: /etc/*-release

Issue following command to find out distro and version of installed Linux-

$ cat /etc/*-release

Sample output:

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=16
DISTRIB_CODENAME=petra
DISTRIB_DESCRIPTION="Linux Mint 16 Petra"
NAME="Ubuntu"
VERSION="13.10, Saucy Salamander"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.10"
VERSION_ID="13.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Method 2: lsb_release

lsb in lsb_release stands for Linux Standard Base

$ lsb_release -a

Sample output:

No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 16 Petra
Release: 16
Codename: petra

Method 3: /proc/version

This command returns kernel version and gcc version which was used to build it.

$ cat /proc/version

Sample output:

Linux version 3.11.0-12-generic (buildd@allspice) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013

Another way to find kernel version:

This command returns kernel version of currently installed Linux OS.

$ uname -r

or

$ uname -mrs

Sample output:

Linux 3.11.0-12-generic x86_64

Thank you.

How to install Adobe Flash Player 11.2 on Fedora (17/18), CentOS/RHEL (5.8/6.3)

Here we are going to tell you how to install Adobe Flash Player Plugin 11.2 on Fedora 18/17/16/15/14/13/12, CentOS 6.3/6.2/6.1/6/5.8 and Red Hat (RHEL) 6.3/6.2/6.1/6/5.8. Using YUM repository provided by Adobe it is very to install and update Flash Player Plugin. Finally native 64-bit(x86_64) version of Adobe Flash Player is made available for Linux users.

Change to root user:

sudo -i

Install Adobe YUM Repository RPM package:

For 32-bit x86-
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

For 64-bit x86_64-
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Update the repositories:

yum check-update

Install Adobe Flash Player 11.2 on Fedora (18/17/16/15/14/13/12), CentOS (6.3/6.2/6.1/6) and Red Hat (RHEL) (6.3/6.2/6.1/6):

yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

Install Adobe Flash Player 11.2 on CentOS 5.8 and Red Hat (RHEL) 5.8:

yum groupinstall "Sound and Video"
yum install flash-plugin nspluginwrapper curl

Top 10 places to learn Linux online

Learn Linux Online

Learn Linux Online

I don’t have to brag on wonderfulness of Linux. As the use of Linux based operating systems in industry is increasing exponentially that it has definitely become a ‘need’ for the IT personnel now. Market needs Linux experts much more than they actually exist. Talking of statistics, growth of demand for good Linux developers is at 31 percent!

Learn Linux Online

Those who want to encash the opportunity, can choose to start learning Linux with few websites which are considered best at what they are doing. Following is the list of such websites:

1. PaulPaulito.com

PaulPaulito has not been there for a long time but looks promising so far. This Netherlands based website is offering training videos in English as well as Spanish and German. The organization running this website is a Linux Professional Institute (LPI) approved training partner. The courses are designed in a way that they help in preparation of LPI certification Exams. It also offers practice exams. This website is not free, costs about 67 USD per month.

2. LPI partners

LPI is a certification organization has its training partners all over the world. The site of LPI itself can be used to look up a training partner around your location.

3. Red Hat

Red Hat has its own training and certification programmes. Most of the courses offered by Red hat are targeted at Red Hat Enterprise Linux, being a Linux vendor has its own advantages. Online courses consists of Red Hat System Administration and Red Hat Linux Troubleshooting, fees starts from $1400.

4. BeginLinux.com

BeginLinux.com provides a variety of courses mainly focused on CentOS Server, Ubuntu Server and Apache Security. Plans start from 95.95$.

5. The Linux Foundation

Variety of online training courses are provided by The Linux Foundation. Classroom programmes are also available. Embedded Linux, the Linux Kernel, Open source Compliance are some courses to name a few of all that are included in offered courses. Advanced tools are used in delivering the course such as live Java-based virtual collaboration and Live audio conference bridge. You can use their search tool to find the course which can fit your need. Prices starting from $2750.

6. Canonical

If you are interested in learning with Ubuntu, Canonical can serve you with huge number of courses listed in their training section.

7. IBM

IBM has its own set of Linux courses. The price for its Linux training classes start at $675.

8. LinuxCertified

LinuxCertified is known to provide onsite training facilities along with distance learning options. You can opt for this at $99.

9. Novell OpenCourseWare

Novell provides free training with no registration overhead. The courses are training modules which help in better understanding of their product just like canonical and IBM.

10. The Virtual Training Company

A wide range of Linux Tutorials are available with The Virtual Training Company. Some content is kept free as well. The tutorials provided are either in Flash or QuickTime format. A user can get a chance to browse though 900 course on the site with a price tag of $30 on it.

These are the few sources which know what they are doing, there exist a lot more than these. We at LinuxStall also try to help you in getting comfortable with Linux. If you wish to add more sources to this list, we have our comment section open.

Take screenshot in Linux with Shutter

Shutter is a free screenshot manager for Linux that can grab your screen, well that’s what every snapshot tool does. Exciting thing about Shutter is that it also allows you to take snapshot of specific area, a particular window or even a website. Right from that window, you can make changes to screenshot to highlight something or draw a pointer to anything you wish. Shutter is written in Perl. Its feature list also includes sending image to photo editors, uploading to websites and auto-thumbnailing.

Shutter is actually 0.7 version of a previously known screenshot manager called GScrot. This Linux only app is of great use to bloggers, technical writers and all those who like showing off their Linux desktop.

How to install Shutter?

Debian / Ubuntu based distro users can execute following command to install Shutter:

user@computer:$ sudo apt-get install shutter

And, for RHEL/Fedora/CentOS users can do it with this command:

user@computer:$ yum install shutter

Screenshot:

Shutter

 

How to start Shutter?

From GUI view, it can be started as follows:

Applications > Accessories > Shutter

Or to do it CLI way, following command will start the app and will grab the whole screen automatically.

shutter --full

To start shutter in window selection mode:

shutter --window

To start in selection mode (in which you can select the part of screen to be grabbed with your mouse):

shutter --selection

To see the help section of shutter:

shutter --help

How to update twitter from Pidgin?

update twitter from pidgin

Pidgin is one of the best chat client available on Linux (and on Windows as well). Most Linux distros are shipping with pre-installed Pidgin as default chat client. The major advantage of using Pidgin is that it supports multiple protocols. One can chat on Facebook, gmail, irc, AIM, yahoo, etc. from the single window. Pidgin has gathered all the platforms together but Twitter. Here we are fixing that up! (Credit goes to developer)

We can use a plug-in called “pidgin-microblog” which will enable the twitter integration with Pidgin. Post installation you can update or get twitter-feed from the very Pidgin. Not just Twitter but Identi.ca, status.net, etc. With this plug-in, You get a notification when you have a new update in twitter.

If you are on debian based distro then you can always fire up thet terminal and run following command to install the plug-in.

 

user@computer:$ sudo apt-get install pidgin-microblog

 

Once you are done with the installation, go to “Accounts” and select “Manage Account”. Then click on “Add” which will navigate you to “Add accounts” window. Select “TwitterIM” and you are very much done.

Last thing you need to do is to authenticate yourself and you can go tweeting all you want right from you little Pidgin.

 

How to connect Ubuntu Server to Dropbox account

dropbox ubuntu

I was looking for a solution to share some of my files in my Ubuntu server to others and while thinking of “cloud computing” at that time, I am thinking if i can try to share my files by linking my box to my existing dropbox account or not. Thus, i give a try and it seem it works. Here are the steps how to do it.

dropbox ubuntu

Step 1. Download and extract the dropbox client

For 32-bit:

chankey@linuxstall:$ $ wget -O dropbox.tar.gz "http://www.dropbox.com/download?plat=lnx.x86"

For 64-bit:

chankey@linuxstall:$ $ wget -O dropbox.tar.gz "http://www.dropbox.com/download?plat=lnx.x86_64"

Step 2. Extract the file

chankey@linuxstall:$ tar -xzvf dropbox.tar.gz

Step 3. Run the dropbox client deamon wiht the following command:

chankey@linuxstall:$ $ ~/.dropbox-dist/dropboxd

Step 4. Since the server is not link to any dropbox account yet, so you will see the following message keep showing every few second:

This client is not linked to any account…
Please visit https://www.dropbox.com/cli_link?host_id=ed2986f99681f0a7b0bf1cd36c79d3e9&cl=en_US to link this machine.
This client is not linked to any account…
Please visit https://www.dropbox.com/cli_link?host_id=ed2986f99681f0a7b0bf1cd36c79d3e9&cl=en_US to link this machine.

Step 5. You may now copy & paste the link to any browser by using any computer so that it will start to link this machine to your dropbox account. You will be asking to provide your username & password in order to link this to your dropbox account.

Step 6. Once it’s successful, you will see the the following message in your Ubuntu linux machine:

chankey@linuxstall:$ $ Client successfully linked, Welcome Chankey!

Step 7. Now you may press CTRL + C to terminate the deamon process now.

Step 8. You can manually start the service by running the following command:

chankey@linuxstall:$ $ ~/.dropbox-dist/dropbox

Step 9. You may start to snyc and copy any file to your dropbox folder now.

How to install GIMP 2.8 RC1 on Ubuntu 12.04

GIMP 2.8 on Ubuntu

GIMP 2.8 RC1 was released on April 8, 2012. The details of this new release are on the official site. Here in this article I’ll show how to install GIMP 2.8 on Ubuntu 12.04.

GIMP 2.8 on Ubuntu

Image credit: Ubuntu Vibes

A PPA for GIMP is now available, we’ll use it for easy installation of GIMP 2.8 RC1. Open up your terminal and type the commands given below:

chankey@linuxstall:$ sudo add-apt-repository ppa:otto-kesselgulasch/gimp
chankey@linuxstall:$ sudo apt-get update
chankey@linuxstall:$ sudo apt-get install gimp

and you’re done. GIMP 2.8 RC1 has been successfully installed on your Ubuntu 12.04.

How to install eclipse in Linux (CentOS, RHEL, Fedora)

how to install eclipse in linux

Eclipse is an integrated development ennvironment primarily for Java but with the extra plugins it can also be used to develop applications in C, C++, PHP, Scala, etc.

Here we are explaining How to install eclipse on linux. Distros covered are Fedora, CentOS and RHEL.

Download Eclipse

Go to www.eclipse.org/downloads/ and select suitable version according to your needs.

Switch to root

ayush@linuxstall:$ su -

Extracting

We are extracting the Eclipse package into /opt directory.

ayush@linuxstall:$ tar -xvzf eclipse-SDK-3.7.2-linux-gtk.tar.gz -C /opt

Adding read permissions

ayush@linuxstall:$ chmod -R +r /opt/eclipse

Creating executable

ayush@linuxstall:$ touch /usr/bin/eclipse
ayush@linuxstall:$ chmod 755 /usr/bin/eclipse
ayush@linuxstall:$ gedit /usr/bin/eclipse

Paste following code in the file.

 #!/bin/sh
export ECLIPSE_HOME="/opt/eclipse" 
$ECLIPSE_HOME/eclipse $*

You are done!