Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, June 27, 2008

how to backup ubuntu os

I have two hard disks one running ubuntu Os and the other is empty unformatted partition.I had to backup the ubuntu Os to the unformatted hard disk. I did the following steps.
->I installed gparted. I formatted the unformatted partition /dev/sdb with ext3
filesystem.
->It created the partition table sdb1.
->I then mounted that partition to /mnt/backupdrive/backup
->I installed sbackup from apt-get
sudo apt-get install sbackup.
->I then used it to backup my ubuntu Os to sdb1

Sunday, June 8, 2008

SET UP ENVIORNMENT

sudo gedit /etc/profile


JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06"
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME

$JRE_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06"
export $JRE_HOME

$CATALINA_HOME="/home/mifos/Desktop/apache/apache-tomcat-5.5.17/"
export $CATALINA_HOME


sudo gedit /etc/enviornment

JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06"

$CATALINA_HOME="/home/mifos/Desktop/apache/apache-tomcat-5.5.17/"



sudo gedit ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.06

export CATALINA_HOME=/home/mifos/Desktop/apache/apache-tomcat-5.5.17/

apt-get cheat sheet

apt-get command cheat sheet for Debian Linux

apt-get is the command-line tool for handling packages for Debian Linux which is use to:
  • Install/manage individual packages
  • Upgrade packages
  • Apply security patch(s)
  • Keep Debian system up to date
  • Download source .deb files
  • Front-end to many GUI and other utilities
Here is quick cheat sheet you will find handy while using apt-get at shell prompt:
Syntax Description Example(s)
apt-get install {package} Install the new package. If package is installed then try to upgrade to latest version apt-get install zip
apt-get install lsof samba mysql-client
apt-get remove {package} Remove/Delete an installed package except configuration files apt-get remove zip
apt-get --purge remove {package} Remove/Delete everything including configuration files apt-get --purge remove mysql-server
apt-get update
apt-get upgrade
Resynchronize the package index files and Upgrade the Debian Linux system including security update (Internet access required) apt-get update
apt-get upgrade
apt-get update
apt-get dist-upgrade
Usually use to upgrade to Debian distribution. For example Woody to Sarge upgrade. 'dist-upgrade' in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. apt-get update
apt-get dist-upgrade

how to show apt-get install < any package>

edit /etc/apt/sources.list file

Wednesday, January 9, 2008

how to unlock the download directory in ubuntu

root@localhost:~# sudo rm /var/lib/dpkg/lock
root@localhost:~# sudo rm /var/cache/apt/archives/lock

or

root@localhost:~# dpkg --configure -a

or

root@localhost:~# sudo apt-get install -f

Thursday, January 3, 2008

how to remove Hz at startup of ubuntu

1>Go to /etc/usplash.conf
2>Change the resolution to appropriate
3>In terminal type sudo update-usplash-theme usplash-theme-ubuntu
4>restart the computer

how to setup networking between windows host and ubuntu guest

Ubuntu
1>Go to System->Administration->Network
2>In connection tab double click in the wired connection
3>In eth0 settings
connection settings

configuration: static ip address
ip address=192.168.0.2
subnetmask=255.255.255.0
gateway address=192.168.0.1
4>In dns tab
add dns server=192.168.0.1
5>open terminal
6> ifconfig
ifconfig -a
sudo ifconfig eth0 192.168.0.20
ifconfig -a
sudo ifconfig eth0 up 192.168.0.20
sudo /etc/init.d/networking restart
cat /etc/resolv.conf
ping 192.168.0.1
sudo ifconfig eth0 up 192.168.0.20
ping google.com
sudo ifconfig eth0 192.168.0.20
sudo ifconfig eth0 up 192.168.0.20
sudo /etc/init.d/networking restart
cat /etc/resolv.conf
ping 192.168.0.1
ping google.com

how to get the lost grub

1>In terminal type sudo grub
2>grub>find /boot/grub/stage1
3>grub>root (hd0,2)
4>grub>setup hd0
5>grub>quit
6>restart computer

how to change the boot priority of os's at startup

1>Go to /boot/grub/menu.lst
2>change the priority of booting of os's

how to log as root in ubuntu

1> Go to System->Administration->Users and Groups
2> Click on root
3> Change the settings of root and save it
4> Close user settings
5> Go to System->Administration->Login Window
6> In Security tab click on Allow local system administrator login
7> log as root

how to remove file system check at the startup of ubuntu

remove the fsck file from the /sbin folder

or

change the values of last column of /etc/fstab to 0

how to install vlc in ubuntu

sudo apt-get install vlc