≡ Menu

command line tool

Synaptic Removed From Ubuntu Linux v11.10

Synaptic is a front-end for the apt package management system. The program allows you to perform all actions of the command line tool apt-get in a graphical environment such as installing, upgrading, downgrading and removing of single packages or even upgrading your whole system. The upcoming Ubuntu Linux version 11.10 (code named Oneiric Ocelot) has removed Synaptic Package Manager.
[click to continue…]

Ubuntu Software Update How To

One of our regular reader asks:

How do I update and patch system under Ubuntu Linux? How do I update desktop and server edition software?

Updating software under Ubuntu Linux is pretty easy. There are two ways to update software as follows:

Method # 1: Ubuntu Linux Software update using command line tools

apt-get is the command-line tool for handling packages, updating package and installing patches under Ubuntu Linux. All you have to do is type the following two command to update all installed software to latest version.

Open terminal and type the following two commands:
$ sudo apt-get update
$ sudo apt-get upgrade

Sample output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  linux-headers-generic linux-image-generic openssh-client openssh-server ssl-cert
The following packages will be upgraded:
  ca-certificates cupsys cupsys-bsd cupsys-client cupsys-common evolution evolution-common evolution-plugins gstreamer0.10-esd gstreamer0.10-plugins-good
  kdelibs-data kdelibs4c2a libcupsimage2 libcupsys2 libgnutls13 libhsqldb-java libpq5 libsmbclient libsmbclient-dev libspeex-dev libspeex1 libssl0.9.8
  linux-image linux-libc-dev linux-restricted-modules-common linux-source-2.6.22 linux-ubuntu-modules-2.6.22-14-generic openoffice.org openoffice.org-base
  openoffice.org-calc openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-evolution openoffice.org-filter-mobiledev
  openoffice.org-gnome openoffice.org-gtk openoffice.org-impress openoffice.org-java-common openoffice.org-math openoffice.org-style-human
  openoffice.org-writer openssl python-uno samba-common smbclient ssh ssh-askpass-gnome ttf-opensymbol tzdata update-manager update-manager-core
  vorbis-tools xserver-xephyr xserver-xorg-core xserver-xorg-dev
56 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 183MB of archives.
After unpacking 119kB of additional disk space will be used.
Do you want to continue [Y/n]? y 

Method # 2: GUI tool - Ubuntu Update Manager

This is a GUI tool. It works like Microsoft / Red Hat / Fedora update manager i.e. you will see a little icon in the kicker bar/taskbar when there are updates available. It will only appear when new upgrades are available. All you have to do is click on it and follow the online instructions.

You can also star GUI tool by Clicking System > Administration > Update Manager > Select Install update
Ubuntu Linux Software Update manager
(Fig.01: Ubuntu Linux Software Update Manager in Action)

Download of the day: atool for Managing File Archives of Various Types

atool is a script for managing file archives of various types such as .zip, tar.gz and all other formats. From the article:

Atool uses other tools behind the scenes to perform the heavy lifting. With atool, you can handle any archive without having to remember what command-line tool to use to expand it and which options that particular tool expects. Atool comes with a collection of commands, including aunpack, apack, als, acat, adiff, and arepack. The tools are all links to the main atool Perl script, but they perform the actions that their name suggests -- for example, unpacking or creating a new archive.

Debian / Ubuntu Linux user can install atool using apt-get command, enter:
$ sudo apt-get install atool
$ aunpack backuo.tar.gz
$ aunpack -e *.tar.gz
$ apack myarchive.zip foo bar
$ man atool

Download atool

=> Download atool package (via Linux.com)

Linux: Monitor Hard Disks Temperature With hddtemp

There is a nice utility to monitor hard drive temperature. Most modern x86 computer hard disk comes with S.M.A.R.T (Self-Monitoring, Analysis, and Reporting Technology). It is a monitoring system for computer hard disks to detect and report on various indicators of reliability, in the hope of anticipating failures.
[click to continue…]

Linux or UNIX password protect files

From my mailbag:

Q. How do I password protect files?

Linux and other Unixish oses offers strong file permissions and ACL (access control list) concept in Linux/UNIX computer security used to enforce privilege separation.

However, none of them offers a password to protect files. You can use GNU gpg (GNU Privacy Guard) encryption and signing tool. It is a suite of cryptographic software. Many new UNIX/Linux users get confused with this fact.

Solution is to use following commands to encrypt or decrypt files with a password.

mcrypt command

Mcrypt is a simple crypting program, a replacement for the old unix crypt. When encrypting or decrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification date of the original. The original file may be deleted by specifying the -u parameter.


Encrypt data.txt file:
$ mcrypt data.txt

Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:

A new file is created with the extension .nc i.e. data.txt.nc:

$ ls data.txt.nc
$ cat data.txt.nc

Decrypt the data.txt.nc file:
$ mcrypt -d data.txt.nc

Enter passphrase:
File data.txt.nc was decrypted.

Verify that file was decrypted:

$ ls data.txt
$ cat data.txt

For mcrypt to be compatible with the Solaris des, the following parameters are needed:
$ mcrypt -a des --keymode pkdes --bare -noiv data.txt
Delete the input file if the whole process of encryption/decryption succeeds (pass -u option):
$ mcrypt -u data.txt
$ mcrypt -u -d data.txt.nc

openssl command

OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) network protocols and related cryptography standards required by them. You can use the openssl program which is a command line tool for using the various cryptography functions of OpenSSL's crypto library from the shell. It can be used for encrypt and decrypt files with a password:


Encrypt file.txt to file.out using 256-bit AES in CBC mode
$ openssl enc -aes-256-cbc -salt -in file.txt -out file.out
Decrypt encrypted file file.out
$ openssl enc -d -aes-256-cbc -in file.out

  • enc : Encoding with Ciphers.

See also: