How to encrypt and decrypt a file in Linux.

There are two commands which do the encryption and decryption of file in Linux. This will be more helpful when you carry confidential data in Laptop or pendrive.

1. Mcrypt is the command for encrypt the file and mdecrypt is the command for decrypt the file.


# cat test.txt

password: test123

# mcrypt test.txt

Enter the passphrase (maximum of 512 characters)

Please use a combination of upper and lower case letters and numbers.

Enter passphrase:

Enter passphrase:

File test.txt was encrypted.

# rm test.txt

# ls -l test*

-rw——- 1 root root 125 2012-08-23 15:59

# mdecrypt

Enter passphrase:

File was decrypted.

# cat test.txt

password: test123


2. Similarly gpg is the command for encrypting and decrypting a file.

Syntax :

a. #gpg –c filename, This will create a gpg extension at the end of the file similarly like nc mentioned above in the example.

b. #gpg –d filename which will decrypt the file.


3. For Windows you can use the gpg software:-

HP data protect – Unable to import host Error no: – 12:1625

Error scenario:

When you try to import client in DP Manager after the successful client installation, you get an error message unable to import client error no: – 12:1625

Client OS: Windows2008R2-64bit




Root Cause:

This problem occurred due to you run the client application through network source. After the successful installation, you can able to find the Data protect client service running in windows and also the port number 5555 will not work.


Copy the installation folder to the local drive and run the application setup. This solves the problem, while running the application setup you can see the Data protect Inet client service started in windows.





To install Turbo C in ubuntu


Today my brother asked me to install Turbo C in Ubuntu machine. He used to work with windows machine, unfortunately his pc has some issues. I checked with Wine for executing the exe files, but not meeting my requirement. Then I found a solution to install Dos commands in Linux. Following solution brief the installation of Turbo C in Ubuntu.


  1. you need to install dosbox emulater in Ubuntu
  2. Installation: $sudo apt-get install dosbox
  3. After the installation, create a new folder in your home directory for the mount point of C
  4. Eg: Z:\>mount c ~/dosprogs
  5. you can then prompt from Z:\> to c:\>
  6. Copy or move the turbo c folder to the newly created folder in the home directory.
  7. Now you can execute the TC command.











VMware compliance checker

Today I come across a VMware tool – VMware Compliance checker which gives compliance report of ESX servers and VMs.

This tool will help us to identify where we required to hardened ESX servers.

To download this tool

Some of the screenshots are shared below.








To monitor Network or ADSL Bandwidth in Ubuntu


To monitor the network bandwidth or internet bandwidth in Ubuntu for understanding network traffic incoming (Rx) and outgoing (Tx)


VNSTAT is the command helps to monitor the network traffic corresponding to the Ethernet adaptors.

To install $sudo apt-get install vnstat








More help:

# vnstat –help

vnStat 1.11 by Teemu Toivola <tst at iki dot fi>

-q,  –query          query database

-h,  –hours          show hours

-d,  –days           show days

-m,  –months         show months

-w,  –weeks          show weeks

-t,  –top10          show top10

-s,  –short          use short output

-u,  –update         update database

-i,  –iface          select interface (default: eth0)

-?,  –help           short help

-v,  –version        show version

-tr, –traffic        calculate traffic

-ru, –rateunit       swap configured rate unit

-l,  –live           show transfer rate in real time

See also “–longhelp” for complete options list and “man vnstat”.


1. You can get the report by using the symbol  > while executing the command.

Eg: $ vnstat > vnstat.txt

2. There is web tool available for generating the reports. Please go through the url below.


A black screen may appear while logon by using remote desktop

Error Symptom:

While logon into a remote server by using remote desktop, the following issues may occur:

1. A slow logon process.
2. A black screen appear for a while, until the regular desktop appear.


  1. Disable the use of “Persistent Bitmap Caching” in Experience tab available on the RDP client option.
  2. Verity that the server, client and the network equipment using the “MTU” size.