setting ip ubuntu via command line /terminal

ada beberapa cara untuk mensetting IP Address di OS ubuntu via terminal/command line atau via GUI, namun kali ini akan di bahas cara mensetting IP Address ubuntu via terminal.

1. buka terminal ubuntu, kemudian ketik perintah berikut :

heroe@heroe:~$ sudo su

[sudo] password for heroe:

root@heroe:/home/heroe# vi /etc/network/interfaces

2. ketikkan alamat Ip Address yg akan dipakai, sebagai contoh:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.66
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.234
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.3
dns-search unila.ac.id

3. setelah itu save dan keluar dari editor

4. lalu restart interface dengan perintah:

root@heroe:/home/heroe# /etc/init.d/networking restart

selesai.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s