HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to Change IP Address on Linux (Terminal Commands)

47,054 views November 9, 2015 4:08

Watch on YouTube
Channelmmk

Description from the creator

Tutorial shows you, how to change IP address on Linux using terminal commands (set a static IP in Linux), Set IP address, Default Gateway and DNS server manually and get an IP address from DHCP server

Find IP address Linux:
The “ifconfig” command is used for displaying current network configuration information.

Find default gateway Linux:
The “route” command is used for displaying default Gateway.

Find DNS server IP Linux:
The "cat /etc/resolv.conf" command is used for displaying DNS Server IP Address.

Setting your IP manually

To assign an IP address on a Linux, you need to use following commands, example:

Command to change IP address:
“sudo ifconfig eth0 192.168.1.112/24”

Command to add default gateway:
“sudo route add default gw 192.168.1.1”

Command to add DNS server IP:
“echo nameserver 192.168.1.1 "Type BRACKET" /etc/resolv.conf”

Note for DNS command: If you are not login as a root you may get Error :
(bash: /etc/reslov.conf: Permission denied),
So, first type “sudo su” command and then type DNS command.

In order to get an IP from a DHCP server, example:

First type "sudo dhclient -r eth0" to release your IP address.

Then type "sudo dhclient eth0" to renew it.


Subscribe To My Channel and Get More Great Tips:
youtube.com/subscription_center?add_user=krests…

Share this Video:
youtu.be/SnACG4TDqJw


Other videos:

How to Change IP Address on Android Tablet - step by step tutorial
youtube.com/watch?v=9eLnaWmVyKw


How to change ip address on windows 8 computer
youtube.com/watch?v=bGSrb0nY3SI

How to change ip address on windows 7 computer
youtube.com/watch?v=kS7zmN8Is4c

How to Change IP Address Easily Using Batch File Script
youtube.com/watch?v=S1jq-uwWRIU

About this tutorial

mmk published this 4:08 video tutorial on November 9, 2015. It has been watched 47,054 times on YouTube.

Channel
mmk
Duration
4:08
Published
November 9, 2015
Views
47,054
Likes
354

Share

This tutorial in other languages