Sunday, May 25, 2008

Basic Commands and Configs for your Linux (Updated)

There are so many commands for configuring Linux distro. They are slightly different with each distro, but most of them are the same. These are some basic commands that people often used. I'm using "nano" as an editor. You can use another that suit you best, such as vi or vim.

Commands and Configs :

1. Interface Configuration
You can configure your interface in :

# nano etc/network/interfaces

We can edit the interface to use DHCP or static.

iface eth0 inet static

auto eth1
iface eth0 inet dhcp

2. Sources List Configuration
You can configure your repository list in :

# nano etc/apt/source.list

edit your sources list and change it with local repository (if there is one available near your country)

3. rc.local Configuration

# nano etc/rc.local

edit the file and put some commands. Whenever you reboot, those commands will be executed.
Note: sometimes, commands must be put in order for them to be executed.

4. Update database and search for files from the database

# updatedb
# locate {file that you're looking for} |less

Those are for now. These commands and configs will be updated.