opkg update && opkg upgrade
opkg install bash
# Please note it's not a system-wide settings, it's only for a current
# terminal session. Point your f\w (if necessery) to execute /opt/etc/profile
# at console logon.
export PATH='/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin'
export TERM=xterm
export TMP=/opt/tmp
export TEMP=/opt/tmp
export HISTFILE=/tmp/mnt/sda1/history/.bash_history
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=1000 # big big history
export HISTFILESIZE=1000 # big big history
# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# You may define localization
#export LANG='ru_RU.UTF-8'
#export LC_ALL='ru_RU.UTF-8'
export TERMINFO=/opt/share/terminfo
[ -f /opt/etc/profile ] && . /opt/etc/profile
[ -f /jffs/configs/profile.add ] && . /jffs/configs/profile.add
[ -f /opt/bin/bash ] && exec /opt/bin/bash
Is this still valid?
How do we save the command history and use it on other terminal?
# Save ash history
cp -f /tmp/home/root/.ash_history /jffs/tmp/.ash_history
# Restore ash history
cp -f /jffs/tmp/.ash_history /tmp/home/root/.ash_history
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
S | Solved [Terminal/Bash] retrieve vpn client's external ip? | Asuswrt-Merlin | 6 | |
C | Bash Loop Error | Asuswrt-Merlin | 8 | |
L | Wi-Fi clients history ? | Asuswrt-Merlin | 3 |
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!