As a tinkerer with soft routing systems, one must know how to use OpenWrt commands. It's easy to haphazardly install plugins for mips, aarch64, and X86 without distinguishing between architectures. At this point, commands to check the CPU architecture come in handy. Below are the OpenWrt query and maintenance commands organized by 彧繎,mainly related to hardware, system, disk, installation, and other commonly used commands.
OpenWrt Common Command Collection
AI Translation
This post is translated from Chinese into English through AI.View Original
AI-generated summary
This document provides a collection of essential OpenWrt commands for managing a soft routing system, focusing on hardware, system, installation, disk management, wireless settings, and other utilities. Key commands include:
**Hardware Commands:**
- `cat /proc/cpuinfo`: View CPU info
- `uname -m`: Check CPU architecture
- `cat /proc/meminfo`: Check memory usage
- `df -h`: Check disk usage
**System Commands:**
- `uname -a`: View kernel info
- `opkg print-architecture`: Accepted architectures
- `dmesg`: Read kernel logs
- `logread`: Read system logs
- `ps -w`: List processes
- `uptime`: Show uptime and CPU load
**Installation Management:**
- `opkg update`: Update package list
- `opkg install *`: Install packages
- `opkg remove *`: Uninstall packages
- `opkg list-installed`: List installed packages
**Disk Management:**
- `fdisk -l`: List partition tables
- `fdisk -n`: Create a new partition
- `mount -t ntfs-3g /dev/sdb1 /mnt/usb`: Mount NTFS disk
**Wireless Commands:**
- `iwinfo wlan0 info`: View wireless card info
- `wifi down` / `wifi up`: Restart wireless service
**Other Commands:**
- `passwd`: Change login password
- `firstboot`: Reset command
- `ifconfig`: Change MAC address
These commands are crucial for effective OpenWrt system management.