Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Thursday, April 25, 2013

How to create a virtual interface on CentOS or Debian

I was working on my DNS server and I wanted to create a virtual interface to distinguish internal requests from external requests. The command to create a virtual interface is:

ifconfig eth0:0 199.133.189.122 netmask 255.255.255.192 up

Monday, March 11, 2013

Commands Vi/Vim editor

As system administrator, I have needed to edit configuration files of some services such as DNS (Domain Name System), LDAP (Lightweight Directory Access Protcol) and etc.

The editor I was using frequently was nano and rarely I used pico. All those editors were used on Ubuntu. When I decided to fit in CentOS, I noticed that I had to install package nano. But I did not want to! I wanted to vary and then I searched and found editor Vi (also it is equal to Vim, although Vim has more features than Vi). I confess, at first time, it was very confused. I did not know what commands to edit file and much less how to save the changes and exit. So I googled and found some commands useful to edit files.

Hereafter, you will see a list of commands to Vi/Vim editor:

CommandDescription
:wqSave the file and exit
:wSave the file
:qQuit and Vi/Vim refuses to exit if any changes was made
:!qQuit without changes to save
:aAppend after cursor
:iInsert after cursor
ESCExit insert/overwrite mode and go back to command mode

Monday, May 30, 2011

First command after install Linux Ubuntu

Hi, I was very busy in this month. I created a new virtual machine (Sun Virtual Box) which has Linux Ubuntu installed. I didn't want install one by one the package necessary for correct working of operating system Linux Ubuntu. After I researched in World Wide Web, I found out a command that allows me install in a single line.

sudo apt-get install ubuntu-restricted-extras