OpenWRT: Set the Environment

Home / OpenWRT: Set the Environment

OpenWRT: Set the Environment

December 3, 2015 | Article | No Comments

So we have install and build the box, know some method for resetting, what next?

Be patient, we have to do something before he step to advance session. In this article we will set some environment for the router and give a little configuration for it.

What would we do?

  1. Set up hostname
  2. Set up password
  3. Set IP address

So let’s start

Set Up Hostname

Hostname is a string identify a node in a network. To set a hostname we have to edit file /etc/config/system. Search string and modify it like this:

config system
option hostname 'XGF135-SkyGear'

Replace XGF135-SkyGear with you desired hostname. In my case, my router would be renamed to XGF135-SkyGear.

Set Up Password

An OpenWRT box come with default blank password for root account. This is dangerous for production machine as anyone can login without password. To set up a password, we can use this command:


Just fill password for root account, twice.

Set IP Address

We can use IP address other than To do so, modify /etc/config/network by using following command:

sed -i -e 's/<your IP here>/' /etc/config/network

Again, replace <your IP here> with your desired IP address.


About Author

about author


A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Share Buttons and Icons powered by Ultimatelysocial