安装 sudo apt install tree 指定显示的深度 例:显示深度为3级: tree -L 3 只显示目录,不显示文件 tree -d -L 3 效果图: 更详细的使用查看tree --help