Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

沙箱配置

添加白名单

如果所部署的python编程环境不在系统路径,而是在${HOME}目录,除了将其添加到$HOME/.bashPATH环境变量之外,需要使用命令安装相应包:

  • 采用系统python环境,用非超管账户安装包,则额外包安装路径为:${HOME}/.local/lib/python3.10/site-packages
$ python -m pip install numpy

则需要在firejail配置尾部添加语句,注意python版本号:

whitelist ${HOME}/.local/lib/python3.10/site-packages

添加编译器白名单

如果安装了其他编译器,需要在firejail配置文件中添加:

private-bin your-compiler-file-name