Powered By Blogger

Monday, 18 October 2010

Recover ubuntu

To recover ubuntu, start machine in rescue mode and execute fsck command.

Tuesday, 12 October 2010

Common Commands

View Directories:
- ls
The ls (LiSt) lists files in different colors with full formatted text

Create Directories:
- mkdir (directory name)
The mkdir (MaKeDIRectory) command will create a directory.

Change Directories:
- cd (/directory/location)
The cd (ChangeDirectory) command will change from your current directory to any directory you
specify.

Copy Files/Directories: 
- cp (file or directory name) (to directory or filename)
The cp (CoPy) command will copy any files you specify. The cp -r command will copy any
directories you specify.

Remove Files/Directories:
- rm (file or directory name)
The rm (ReMove) command will delete any filename you specify. The rm -rf command will
remove any directory you specify.

Rename Files/Directories:
- mv (file or directory name)
The mv (MoVe) command will rename/move any file or directory you specify.

Find Files/Directories:
- locate (file or directory name)
The locate command will search your computer for any filename you specify. It uses an index of
the files on your system to work quickly: to update this index run the command updatedb. This
command is run automatically each day, if you leave your computer on.

Convert .rpm files to .deb files. [rpm- red hat package manager]

1. Install the alien program
2. Run the following command in a terminal, with administrative privileges:
sudo alien package_file.rpm

Install a .deb file

You will need administrative privileges to install a .deb file 
1. To install a .deb file, simply double click on it, and then select Install Package

2. Alternatively, you can also install a .deb file by opening a terminal and typing:
sudo dpkg -i package_file.deb

3. To uninstall a .deb file, deselect it in your package manager, or type:
sudo dpkg -r package_name

Install Any Software From Terminal.

• Install packages:
sudo apt-get install packagename

• Remove packages:
sudo apt-get remove packagename

• Retrieve new lists of packages:
sudo apt-get update

• Upgrade system with available updates:
sudo apt-get upgrade

• List further commands and options:
apt-get help

Command to stop,start,restart network

sudo /etc/init.d/networking stop

sudo /etc/init.d/networking start

sudo /etc/init.d/networking restart

Command To Edit Network Files

sudo gedit /etc/resolve.conf

specify nameserver here.

sudo gedit /etc/network/interfaces

specify eth0,eth1..connections here with IP-address, subnetmask and gateway.

Command To Edit Files.

sudo gedit yourpathoffile

Command To Delete Files In home Directory

sudo nautilus    
NOTE-Be Careful while using this command,you might damage your system!