| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:base-system:system_configuration [2022/01/31 12:43] – Improve timezone and zonename description dgcampea | docs:guide-user:base-system:system_configuration [2023/12/10 08:30] – reorganize vgaetera |
|---|
| ====== System configuration /etc/config/system ====== | ====== System configuration /etc/config/system ====== |
| The system UCI subsystem configuration file is located in ''/etc/config/system''. | The system UCI subsystem configuration file is located in ''/etc/config/system''. |
| | The default settings are: |
| ===== System section ===== | |
| The ''system'' section contains settings that apply to the most basic operation of the system, such as the hostname, the time zone, and how and where to write logging information to. The default settings are: | |
| |
| <code bash> | <code bash> |
| # uci -N show system.@system[0] | # /etc/config/system |
| system.@system[0]=system | |
| system.@system[0].hostname='OpenWrt' | config system |
| system.@system[0].timezone='UTC' | option hostname 'OpenWrt' |
| system.@system[0].ttylogin='0' | option timezone 'UTC' |
| system.@system[0].log_size='64' | option ttylogin '0' |
| system.@system[0].urandom_seed='0' | option log_size '64' |
| | option urandom_seed '0' |
| | |
| | config timeserver 'ntp' |
| | option enabled '1' |
| | option enable_server '0' |
| | list server '0.openwrt.pool.ntp.org' |
| | list server '1.openwrt.pool.ntp.org' |
| | list server '2.openwrt.pool.ntp.org' |
| | list server '3.openwrt.pool.ntp.org' |
| </code> | </code> |
| | |
| | ===== System section ===== |
| | The ''system'' section contains settings that apply to the most basic operation of the system, such as the hostname, the time zone, and how and where to write logging information to. |
| |
| These options can be set in the system section: | These options can be set in the system section: |
| | ''ttylogin'' | bool | no | ''0'' | Require authentication for local users to log in the system. Disabled by default. It applies to the access methods listed in ''/etc/inittab'', such as keyboard and serial. | | | ''ttylogin'' | bool | no | ''0'' | Require authentication for local users to log in the system. Disabled by default. It applies to the access methods listed in ''/etc/inittab'', such as keyboard and serial. | |
| | ''urandom_seed'' | string | no | ''0'' | Path of the seed. Enables saving a new seed on each boot. | | | ''urandom_seed'' | string | no | ''0'' | Path of the seed. Enables saving a new seed on each boot. | |
| | ''timezone'' | string | no | ''UTC'' | //POSIX.1 time zone// string corresponding to the time zone in which date and time should be displayed by default. See [[https://github.com/openwrt/luci/blob/master/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua|timezone database]] for a mapping between IANA/Olson and POSIX.1 formats. (For London this corresponds to ''GMT0BST,M3.5.0/1,M10.5.0'') | | | ''timezone'' | string | no | ''UTC'' | //POSIX.1 time zone// string corresponding to the time zone in which date and time should be displayed by default. See [[https://github.com/openwrt/luci/blob/master/modules/luci-lua-runtime/luasrc/sys/zoneinfo/tzdata.lua|timezone database]] for a mapping between IANA/Olson and POSIX.1 formats. (For London this corresponds to ''GMT0BST,M3.5.0/1,M10.5.0'') | |
| | ''zonename'' | string | no | ''UTC'' | //IANA/Olson time zone// string. If ''zoneinfo-*'' packages are present, possible values can be found by running ''find /usr/share/zoneinfo''. See [[https://github.com/openwrt/luci/blob/master/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua|timezone database]] for a mapping between IANA/Olson and POSIX.1 formats. (For London this corresponds to ''Europe/London'') | | | ''zonename'' | string | no | ''UTC'' | //IANA/Olson time zone// string. If ''zoneinfo-*'' packages are present, possible values can be found by running ''find /usr/share/zoneinfo''. See [[https://github.com/openwrt/luci/blob/master/modules/luci-lua-runtime/luasrc/sys/zoneinfo/tzdata.lua|timezone database]] for a mapping between IANA/Olson and POSIX.1 formats. (For London this corresponds to ''Europe/London'') | |
| | | ''zram_comp_algo'' | string | no | ''lzo'' | Compression algorithm to use for ZRAM, can be one of ''lzo'', ''lzo-rle'', ''lz4'', ''zstd'' | |
| | | ''zram_size_mb'' | integer | no | Ramsize in kB divided by 2048 | Size of ZRAM in MB | |
| </sortable> | </sortable> |
| |
| <code bash> | <code bash> |
| cat << "EOF" >> /etc/crontabs/root | cat << "EOF" >> /etc/crontabs/root |
| 0 0 * * * /etc/init.d/system restart | 0 0 * * * service system restart |
| EOF | EOF |
| uci set system.@system[0].cronloglevel="9" | uci set system.@system[0].cronloglevel="9" |
| uci commit system | uci commit system |
| /etc/init.d/cron restart | service cron restart |
| </code> | </code> |
| |