# sudo -S 可实现在脚本中自动输入sudo的密码echo "123456"|sudo -S apt-get intsall w3m //该脚本指令是实现在 sudo 时输入 123456 密码后执行 apt-get intsall w3m 指令