使用zip命令压缩 进入需要压缩文件的目录后执行 单个文件:zip -e test.zip text.txt 文件夹:文件:zip -er test.zip text 不加密:zip -r test.zip text 执行命令输入两次密码即可,注:保证路径正确。