How configuring LEDE works

Ok I've used PUTTY and can interact with my router with SSH but, given that I have Windows 10 Pro 64 bit, where would I write stuff like this to interact with my router:


Here an example, looking at the first two sections of the “system” subsystem from uci's command line interface:

root@lede:~# uci show system
system.@system[0]=system
system.@system[0].hostname='lede'
system.@system[0].timezone='UTC'
system.ntp=timeserver
system.ntp.server='0.lede.pool.ntp.org' '1.lede.pool.ntp.org' '2.lede.pool.ntp.org' '3.lede.pool.ntp.org'
system.ntp.enabled='1'
system.ntp.enable_server='0'


This looks like something I'd type in my command interface but, I doubt if that's where one would type this.

Instead of using uci commands, you usually edit the actual config files in /etc/config by a text editor like nano.

most of the configs are in /etc/config and can be edited with a text editor
(it's a good idea to learn vi, it's old, it's odd, but it's available on any
*nix based system)

these parameters can be changed via the LUCI web GUI, via command-line uci
tools, or by editing the files directly

to learn how to use a command, do man and you should get a page of
instructions

hope this helps,

David Lang
kk

1 Like

Well I used Vi back in the 1980s with UNIX but don't have Vi or Vim on my Windows 10 Pro 64 bit. I can type commands and use text editors etc. The problem is how to interact with the router with these commands in Windows. SSH can "talk" with the router. But how does one issue commands like these and have them get to the router?

root@lede:~# uci show system
system.@system[0]=system
system.@system[0].hostname='lede'
system.@system[0].timezone='UTC'
system.ntp=timeserver

Are these simply issued with Telnet for example?

I think I am asking something so basic that it has been completely left out of the documentation., Namely how to issue these Command line instructions and have my LEDE router get the instructions?

If this is true, then you should see this in putty:
root@lede:~#

Right there you enter uci show system, so you see this in putty:
root@lede:~# uci show system

Hit enter, and you will get back:

system.@system[0]=system
system.@system[0].hostname='lede'
system.@system[0].timezone='UTC'
system.ntp=timeserver
system.ntp.server='0.lede.pool.ntp.org' '1.lede.pool.ntp.org' '2.lede.pool.ntp.org' '3.lede.pool.ntp.org'
system.ntp.enabled='1'
system.ntp.enable_server='0'

Learn more about uci: https://wiki.openwrt.org/doc/uci

VI is included in LEDE itself, as hnyman and dlang have mentioned you can also install other editors like nano and they will also be part of LEDE once installed, i think that's what you were looking for.

1 Like

If you are on Windows then you may want to try using WinSCP.

It's a file manager, text editor and SSH shell all in one. I still use putty, but rarely.

1 Like

Thank you for your pointers! They did help. I am used to interacting with a router through a web like interface so am trying that way now. Undoubtedly with production settings the SSH approach could be faster.

Also consider cmder - www.cmder.net. I wrote a blog post telling why I think it's so good: http://richb-hanover.com/cmder-for-windows-alternative-to-putty

What is the correct way of changing this configuration value using the uci tool?

uci set system.ntp.server='0.fr.pool.ntp.org' '1.fr.pool.ntp.org' '2.fr.pool.ntp.org' '3.fr.pool.ntp.org'

...doesn't do it.

As already written above: https://wiki.openwrt.org/doc/uci

Thank you, so there is no way of setting it in one command, we must delete the list and then add items one-by-one:

uci delete system.ntp.server
uci add_list system.ntp.server='0.de.pool.ntp.org'
uci add_list system.ntp.server='1.de.pool.ntp.org'
uci add_list system.ntp.server='2.de.pool.ntp.org'