Wednesday, October 19, 2016

How to find filesystem type in linux machine?

There are many ways to find the filesystem of a partition in linux (provided the partition mounted)
Following are the command line tools run these commands as is in terminal.

1.  cat /etc/fstab

2.  cat /etc/mtab

3.  mount

4.  df -T

Note:  You should know the partition number (like /dev/sda2, /dev/sda4 etc.,) or the partition label (Like mypendrive, 8GB_drive etc.,) or the UUID number.

Tuesday, October 18, 2016

Youtube videos not working asking for flash plugin | How to install adobe-flash player in (Debian based)Linux?


1.  Download the adobe-flash player from -> https://get.adobe.com/flashplayer/

2.  Select ".tar.gz for other linux" then click on "Download now"
        Note:  If you are using debian or rpm based linux then select your option accordingly.

3.  Unpack the download file (Right-click on the file and select -> "Extract here")
        (Note:  There will be a readme.txt file inside the extracted directory (like install_flash_player_11_linux.i386).  This file contains the detailed instructions for installation for all the flavours of Linux.)

4.  copy the "libflashplayer.so" file into following directories

        a. /usr/lib/flashplugin-nonfree/
        b. /usr/lib/mozilla/plugins/
        If you have chromium browser then copy the file into
        c. /usr/lib/chromium/plugins/
       
5.    Test the flash plugin -> Close the browsers (if already opened) then start again.
        Now, open youtube and check the videos will play like charm.

Wednesday, October 5, 2016

How to enable ssh access for root user in Linux (debian based)?

1. Edit the /etc/ssh/sshd_config file as sudo(or root) user
        $sudo vim /etc/ssh/sshd_config
2. Modify the "PermitRootLogin" value as "yes" under "Authenticaton" Section
        After editing your sshd_config file's Authentication section will look like

sshd_config screen shot "PermitRootLogin yes"

PermitRootLogin yes

3. Save the changes (esc :wq)
4. Restart the ssh service
        $sudo /etc/init.d/ssh restart
       
5.  Now check root login via ssh from a remote machine
        (From a another/remote machine)
        $ssh root@
       
Note:
The parameter PermitRootLogin can take any of the following values namely,
    yes, without-password, forced-commands-only, no
   
   
PermitRootLogin
 "yes"                                    =    ssh root login allowed

 "without-password"         = password authentication is disabled for root.

 "forced-commands-only" = root login with public key authentication will be allowed,
                                                     but only if the command option has been specified. All
                                                     other authentication methods are disabled for root.

 "no"                                        = root is not allowed to log in.




Wednesday, July 8, 2015

How to fix "nickname is already in use" error in irc?

What causes IRC to throw "nickname is already in use":
1.  You are not closed your previous session of IRC chat
     a) Trying to login with same nickname in another place/application with 
          existing active connection.
2.  You are internet connectivity disconnected & IRC server not released 
      your session.

How to fix:
a) /msg nickserv ghost <your_nickname> <password>
b) /msg nickserv <your_nickname>
b) /msg NickServ identify <password>

Tuesday, July 7, 2015

Migrate Postgresql 9.1 to 9.4 in 4 steps

Postgresql elephant
By Jeff MacDonald [BSD], via Wikimedia Commons


$pg_lsclusters - Shows the currently running (online/down) postgres DB

$sudo pg_ctlcluster 9.1 main stop - Stops the running postgres 9.1

$sudo pg_upgradecluster 9.1 main - Upgrades(migrates) postgres to newer version(upgrade time depends on the amount of data).

Check whether the upgrade went fine and the newer version of postgres works fine by
$su postgres
postgres@xyz:/$ psql
psql (9.4.3)                       Now postgresql upgraded to new version
Type "help" for help.
postgres=#\l                     -   Check all your databases are available or not
postgres=#\c <your_database_name>  - Connects to your database
postgres=#select * from <your_table_name> - Check the content is same.

Optional:
$sudo pg_dropcluster 9.1 main  -  Do this only, If you really want to drop your old postgres cluster.