# How Can I Change the Hostname Without Room to Install Luci?

**URL:** <https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390>\
**Category:** Router\
**Created:** [May 1, 2022, 4:52pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390 "2022-05-01T16:52:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 1, 2022, 4:52pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/1 "2022-05-01T16:52:22Z")

</div>

I installed the Tor firmware for the mini-router. It’s great but now I can’t install Luci which means I can’t change my hostnname. The hostname identifies the model of the router, that it’s a gl.inet mini-router.

There aren’t that many people in the world who own these (it’s not millions) and it makes it a lot easier for me to be tracked and could result in having less privacy.

Is there a way I can get into the router and change the hostname?

Also, is there a file I can edit anywhere to make sure that the 1st node and 2nd node are not in certain countries?

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 1, 2022, 5:24pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/2 "2022-05-01T17:24:24Z")

</div>

You can SSH into the router and edit the WAN hostname and/or LAN hostname in the /etc/config/network file, then reboot.

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:20pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/3 "2022-05-02T13:20:19Z")

</div>

How do I ssh into the router? I’ve wanted to do this a long time. I can use terminal but when I type ssh 192.168.8.1 it says I don’t have a key

I need a key!

I can figure out how to generate a key possibly but I don’t know how to get it onto the router.

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 2, 2022, 1:24pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/4 "2022-05-02T13:24:44Z")

</div>

I have used PuTTY free software ([https://www.putty.org](https://www.putty.org)) for a number of years. On the first connection, it will ask you whether to trust and allow the connection.

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:28pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/5 "2022-05-02T13:28:05Z")

</div>

Will it ask me for a password?

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 2, 2022, 1:29pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/6 "2022-05-02T13:29:56Z")

</div>

Yes. Log in with username **root** and use your admin password from the GL.iNet UI:

> **[SSH to the Router - GL.iNet Docs](https://docs.gl-inet.com/en/3/tutorials/ssh/#using-putty)**
>
> Documentation for GL.iNet Productions

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:30pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/7 "2022-05-02T13:30:01Z")

</div>

Right now I am trying in a linux terminal to connect

ssh 192.168.8.1

it then asks for a password. I’ve tried my gl password multiple times and it doesnt accept it

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:30pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/8 "2022-05-02T13:30:42Z")

</div>

i dont know who you are, but thank you for this

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:35pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/9 "2022-05-02T13:35:04Z")

</div>

once i get to the shh command line, do i need to log in again somehow?

i typed in a basic command “dir” to show the directory structure and it fails, but I am connected

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:38pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/10 "2022-05-02T13:38:02Z")

</div>

does busybox have really unusual commands? or do I need to go into a different window to connect? ash seems to reject everything i type as a command it doesn’t understand

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 1:44pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/11 "2022-05-02T13:44:53Z")

</div>

okay i am seeing busybox does have some limited linux commands, it’s just not many

I have no idea how to edit this file

In a normal linux system I would just sudo nano and then open what I need. How do I do that here?

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 2, 2022, 2:14pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/12 "2022-05-02T14:14:12Z")

</div>

OpenWRT is Linux-based, so you have to use Unix commands:

> cd /etc/config  
> ls -l network

Personally, I use the **vi** editor as I know it from many years ago. There is also the **vim** editor, which is the successor to **vi**.

If you do not know these editors, then you can install WinSCP free software for Windows, instead of **ssh** :

> **[Modify files on the router - GL.iNet Router Docs 3](https://docs.gl-inet.com/router/en/3/tutorials/scp/)**
>
> Documentation for GL.iNet Router Productions

You can also install the **nano** package in OpenWRT if you want to use that.

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 2, 2022, 2:20pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/13 "2022-05-02T14:20:04Z")

</div>

yes i will install nano

i use linux already, just not busybox linux

i was actually trying to get in with nautilus to modify things since i don’t have windows and tried to do ssh://root@192.168.8.1 and it fails and won’t let me in

i can add in nano and do it locally but it would be so much easier to be able to see what im doing in nautilus

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 3, 2022, 12:13am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/14 "2022-05-03T00:13:08Z")

</div>

I went in, installed nano, and edited both the wlan and wlan hostname and it didn’t result in any change

I reset the router multiple times and verified the settings were saved in /etc/config/network

i had this router connect to another router (router 2) to verify if the hostname had changed and was able to see the hostname has not changed all all. this was not an issue regarding cache or the other router not updating things since i cleared settings before the connect on the other router.

this did nothing, the problem is not fixed ☹

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 3, 2022, 2:10am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/15 "2022-05-03T02:10:21Z")

</div>

There are 2 aspects of displaying the hostname of the router:

1. The WAN hostname of Router 1 is displayed in the LuCI UI and maybe elsewhere. I have set to my router’s hostname to **glinet2** in this example, which is correctly displayed:

 ![image](https://forum-static.gl-inet.com/original/2X/e/e6ee1a4a7f2481614791c0b7379db735676644d2.png)

1. The WAN hostname of Router 1 is sent to and displayed by an upstream Router 2, which my understanding is that Router 1 has to get an IP address from the DHCP server of Router 2.

Can you confirm that the WAN interface of Router 1 is configured to be a DHCP client of Router 2? If it is, can you post the modified _/etc/config/network_ file?

Also, what makes/models are your Router 1 and Router 2?

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 3, 2022, 2:53am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/16 "2022-05-03T02:53:12Z")

</div>

This is a travel router. It has very little space and I can’t install LuCI. I know how to change the hostname in LuCI. I would like to be able to do that but it’s not installed.

All my space is taken because I have installed firmware that has tor built into it. The tor software takes up a large amount of space on the travel router. I’m surprised I could even install nano.

I replaced the hostnames “GL-model” with “samplename” in /etc/config/network and checked multiple times including after rebooting to make sure it had saved. network is about a 30 line file or less with different settings. I was in the right place. There were two spots for hostnames and I changed both.

I connected to the other router and the hostname was still GL-Model and not samplename. The other router lets me see the names of what is connected to it.

There must be some other place that the hostname is stored. When the wifi network connects to the other router, it’s pulling this hostnname from another file that wasn’t edited. I just dont know what file it is.

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 3, 2022, 3:02am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/17 "2022-05-03T03:02:44Z")

</div>

Is there a program i can install that changes the hostname without taking up as much space as LuCI? I could install the program using the normal interface and run it in the terminal. Is there anything like that? i got nano on there

---

<div class="post-metadata">

**Author:** ![CharlesWorth](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@CharlesWorth](https://forum.gl-inet.com/u/CharlesWorth)\
**Post date:** [May 3, 2022, 3:44am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/18 "2022-05-03T03:44:23Z")

</div>

dont think this will work at all after looking.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [May 3, 2022, 7:48am UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/19 "2022-05-03T07:48:27Z")

</div>

Which “Hostname” do you want to change?

The hostname can be changed in `/etc/config/system`.

But it may not what you mean.

Do you refer to the name that it appears in your windows (if you use windows) network?

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [May 3, 2022, 2:05pm UTC](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390/20 "2022-05-03T14:05:35Z")

</div>

I missed finding that the hostname is also in _/etc/config/system_.

_I do not work for and I do not have formal association with GL.iNet_

[Next page](https://forum.gl-inet.com/t/how-can-i-change-the-hostname-without-room-to-install-luci/21390.md?page=2)
