使用自带的包qrencode 安装: yum install qrencode zypper in qrencode 生成二维码: qrencode -l M -t UTF8 -k "此处输入文字内容" 效果如图: