# Config file syntax check

**URL:** <https://forum.openwrt.org/t/config-file-syntax-check/147132>\
**Category:** Installing and Using OpenWrt\
**Created:** [January 2, 2023, 6:07am UTC](https://forum.openwrt.org/t/config-file-syntax-check/147132 "2023-01-02T06:07:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakesh](https://forum.openwrt.org/letter_avatar/rakesh/32/6_449c533f586939b6e5f246632a46421f.png) [@rakesh](https://forum.openwrt.org/u/rakesh)\
**Post date:** [January 2, 2023, 6:07am UTC](https://forum.openwrt.org/t/config-file-syntax-check/147132/1 "2023-01-02T06:07:05Z")

</div>

Hello Folks,  
Happy new year to you all forum members.

Help me with the below query if you can.

After I am done editing a config file (/etc/config/network, etc/config/firewall etc), is there a way to check that the syntax of the file is intact before I do a config reload or reboot?

Looking for a way to avoid bricking the system when I am editing a config file due to manual/cp-paste error.

I am aware of the command "uci changes", which apparently catches such errors. But I am not sure it covers the edits done using a file editor.

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [January 2, 2023, 6:47am UTC](https://forum.openwrt.org/t/config-file-syntax-check/147132/2 "2023-01-02T06:47:33Z")

</div>

AFAIK `uci show <file>` will complain if there are syntax errors.

---

<div class="post-metadata">

**Author:** ![rakesh](https://forum.openwrt.org/letter_avatar/rakesh/32/6_449c533f586939b6e5f246632a46421f.png) [@rakesh](https://forum.openwrt.org/u/rakesh)\
**Post date:** [January 2, 2023, 3:33pm UTC](https://forum.openwrt.org/t/config-file-syntax-check/147132/3 "2023-01-02T15:33:47Z")

</div>

I did a negative test. Checks out fine.

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [January 12, 2023, 3:33pm UTC](https://forum.openwrt.org/t/config-file-syntax-check/147132/4 "2023-01-12T15:33:52Z")

</div>

Closed on January 12, 2023, 3:33pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
