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

How to enable ssh in Ubuntu?

$ sudo apt-get install ssh

How to set password for the root in Ubuntu?

user@desktop:~$ sudo passwd root
[sudo] password for user:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

user@desktop:~$

Saturday 2 May 2009

How to enable SSH for ESXi


1.Go to the ESXi console and press alt+F1
2.Type: unsupported
3.Enter the root password(No prompt, typing is blindly)
4.At the prompt type “vi /etc/inetd.conf”
5.Look for the line that starts with “#ssh” (you can search with pressing “/”)
6.Remove the “#” (press the “x” if the cursor is on the character)
7.Save “/etc/inetd.conf” by typing “:wq!”
8.Restart the management service “/sbin/services.sh restart”

Google Search