Tuesday, 23 June 2009

Wednesday, 10 June 2009

How to Check CentOS release?

Use Command:
#cat /etc/redhat-release

How to Kill Zombie Process?

Use Command Check Process:
#top
or
#ps aux
or
#ps -el
or
#ps aux | awk '{ print $8 " " $2 }' | grep -w Z
or
#ps -elf | grep Z
or
#ps -ef | grep firefox

Output:
Z 6502
Z 8320
Z 6985

Use Command kill zombie Process:
# kill -9 6985

Friday, 5 June 2009

Wednesday, 27 May 2009

How do I check free disk space in Linux and UNIX?

Type df -h or df -k to list free disk space:

#df -k

#df -h
#du -h

Wednesday, 20 May 2009

Download Ubuntu


- Desktop Edition

- Netbook Remix

- Server Edition


Sunday, 10 May 2009

How do you switch to root user ?

in the shell you type su
$ su
then it will ask u for the password
Password :

Saturday, 9 May 2009

Ubuntu 9.04 Sources List

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty universe
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cl.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
# deb-src http://cl.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ jaunty-security universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security universe
deb http://archive.ubuntu.com/ubuntu/ jaunty-security multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security multiverse

Thursday, 7 May 2009

Linux Filesystem Hierarchy of CentOS 5

As a Linux beginner, it is always hard to understand what all these directory names means. Here is a list of the directory hierarchy of CentOS 5.

/ the root of everything
/bin common linux commands. such as ls, cp, gzip, etc
/boot boot codes of Linux - not to touch it unless you are going to re-compile kernel/boot/grub - the boot loader
/dev device files - everything is a file (these files are not device drivers)
/dev/ttyS0 - first serial port (COM1)
/dev/lp0 - first parallel port (LPT1)
/dev/hda - first hard disk (IDE0)
/etc most configuration files
/etc/X11 - configuration files for X Windows
/home home directories for users
/lib shared library files (C libraries)
/lost+found stray files that is found after system crashes
/media mount point for removable media
/misc
/mnt mount point for temporary filesystems
/net
/opt larger application softwares - such as OpenOffice
/proc virtual files for various process such as CPU, RAM, etc
/root home directory for the root user
/sbin commands for system users and many system configuration utilities
/selinux SElinux files
/srv data for services
/sys
/tmp temporary files
/usr a secondary hierarchy/usr/bin - some advanced commands and user installed commands
/usr/src - kernel source
/usr/local - used to install packaqes from source
/usr/sbin - system commands
/usr/doc - documentations
/usr/man - man pages
/var often changing files - system logs, print spoolers, mail spoolers, etc

Monday, 4 May 2009

start / stop / restart services in Ubuntu

$ sudo /etc/init.d/ssh stop
$ sudo /etc/init.d/networking restart
# service networking restart

Google Search