≡ Menu

command line tools

Debian Linux: Change Hostname / Computer Name Permanently

How do I change the hostname of a Debian Linux system permanently using the command line tools?
[click to continue…]

AIX UNIX: Enabling Jumbo Frames

How do I setup jumbo frames under IBM AIX operating systems using command line tools?
[click to continue…]

UNIX Command Line Tools For MS-Windows XP / Vista / 7 Operating Systems

I wish I had access to one of those nifty UNIX command-line tools under MS-Windows Vista or XP operating systems. How do I access UNIX command line utilities under Windows with out using virtualization?
[click to continue…]

HowTo: Check RAM Size In Ubuntu Linux

How do I check amount of RAM in my Ubuntu Linux laptop or desktop system/server using GUI and command line tools?
[click to continue…]

Linux LVM error VG meta data inconsistent and Solution

Q. How do I fix the following error under CentOS Enterprise Linux:

LVM error VG meta data inconsistent

How do I fix this problem?

A. You need to use lvm command, which provides the command-line tools for LVM2. In order to fix this problem boot your Linux into rescue mode or a single user mode:

First, you need to restore the VG Meta data, enter:
lvm vgcfgrestore VG

Now, you need to rescan for physical devices and vol groups (scan all disks for physical volume), enter:
lvm pvscan
lvm vgscan

Finally, make the volume group active, enter:
lvm vgchange -ay VG

For more information read lvm man page:
man lvm

Ubuntu Linux: Upgrade Linux Kernel

Q. How do I upgrade my Linux kernel version under Ubuntu Linux 7.04 / 7.10?

A. You can use any one of the following method:
(a) Command Line Tools – apt-get

(b) GUI tool

apt-get command – Upgrade Linux Kernel

Open terminal and type the following commands:
$ sudo apt-get update
Now search kernel version:
$ apt-cache search kernel-image
Now install kernel by explicitly specifying version number:
$ sudo apt-get install linux-image-2.6.xx-yy-generic
Replace xx.yy with kernel version number. Reboot the system.

GUI tools

This is recommended method for most user. Click on System > Administration > Update Manager > Click on Check button > Apply all updates including kernel.

HowTo: Create Files in Linux From a Bash Shell Prompt

I‘m a new to CentOS Linux user. How do I create a file from bash prompt without using GUI tools?
[click to continue…]

Ubuntu Linux stop / disable GNOME GUI ~ X.org

Q. I don’t need GUI as I’m developing CLI based applications. By default Ubuntu Loads Gnome GUI. How do I disable X.org / Gnome under Linux so that I get text only login?

A. You can use GUI tools or command line tools to disable GDM (Gnome Display Manager) service (/etc/init.d/gdm).

Disable GDM using GUI tools

The Services Administration Tool allows you to specify which services will be started during the system boot process. You can type the command:
services-admin &

Or just click on System > Administration > Services

Now you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. After entering the administrator password, the following window is displayed:

Ubuntu Linux stop / disable GNOME GUI (X.org)

Make sure you remove GDM (Gnome login manager) by disabling the the checkbox and close the window.

Enable GDM using Command Line (CLI) tools

Ubuntu comes with rcconf and update-rc.d command. rcconf allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off.

Install rcconf

Use apt-get command:
sudo apt-get install rcconf
Now start rcconf:
sudo rcconf
Again you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. After entering the administrator password, the following text based window is displayed on screen:
Ubuntu / Debian Runlevel configuration tool

Next enable GDM service by pressing space bar (check the checkbox) > Click OK to save the changes.

update-rc.d command

This is 3rd and old method. You can enable or disable any service using update-rc.d command.

Task: Disable X.org GUI

Just enter command:
sudo update-rc.d -f gdm remove

Task: Enable X.org GUI

Just enter command:
sudo update-rc.d -f gdm defaults

You can always start GUI from a shell prompt by typing startx command:
startx &

Please note that you can use above tools to enable or disable any services under Debian / Ubuntu Linux.

See also:

Linux change ip address

Q. How do I change ip address in Linux?

A. There are different ways to change IP address in Linux
(a) Command Line tools

(b) Modify configuration files

(c) Use GUI tools

Task: Display current IP address and setting for network interface called eth0

Use ifconfig command:
# ifconfig eth0
Output:

eth0      Link encap:Ethernet  HWaddr 00:30:48:5A:BF:46
          inet addr:10.5.123.2  Bcast:10.5.123.63  Mask:255.255.255.192
          inet6 addr: fe80::230:48ff:fe5a:bf46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:728204 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1097451 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:62774749 (59.8 MiB)  TX bytes:1584343634 (1.4 GiB)
          Interrupt:177

Task: Change IP address

You can change ip address using ifconfig command itself. To set IP address 192.168.1.5, enter command:
# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up
# ifconfig eth0

To make permanent changes to IP address you need to edit configuration file according to your Linux distribution.

Change IP address under RedHat / CentOS / Fedora core Linux

=> Please read – Howto change and setup IP address in Redhat Linux

Change IP address under Debian / Ubuntu Linux

=> Please read – Howto change and setup IP address in Ubuntu / Debian based Linux distros

Fedora core Linux sound card configuration

Q. How do I configure Fedora Linux sound card using GUI and command line tools?

A. You can use GUI tool called redhat-config-soundcard to configure sound under Fedora or Red Hat enterprise Linux or Cent OS etc.

Just type the following command:
redhat-config-soundcard &

If you didn’t hear any sound use aumix to setup sound volume:
aumix &

Or try GUI tool:
gnome-volume-control &