文章目录  Linux:Ubuntu系统配置本地apt仓库 挂载本地的光驱到指定的挂载目录 编辑开机挂载配置文件 检查开机挂载配置文件的语法是否正确 检查开机设置是否成功 对原有的sourece.list文件进行重命名使其失效 使用命令自动生成新的sourece.list文件 使用镜像文件配置本地仓库 更新软件仓库缓存 测试本地软件仓库是否可用,下载gcc编译器进行测试   
 
root@shanxin:~
root@shanxin:~
mount: /ubuntu: WARNING: source  write-protected, mounted read-only.
root@shanxin:~
文件系统       类型     大小  已用  可用 已用% 挂载点
tmpfs          tmpfs    388M  1 .9M  386M    1 % /run
/dev/sda3      ext4      20G   12G  6 .6G   64 % /
tmpfs          tmpfs    1 .9G     0   1 .9G    0 % /dev/shm
tmpfs          tmpfs    5 .0M  4 .0K  5 .0M    1 % /run/lock
/dev/sda2      vfat     512M  6 .1M  506M    2 % /boot/efi
tmpfs          tmpfs    388M  144K  387M    1 % /run/user/0
/dev/sr0       iso9660  4 .7G  4 .7G     0   100 % /ubuntu
root@shanxin:~
/swapfile                                 none            swap    sw              0        0 /dev/sr0        /ubuntu  iso9660        defaults        0        0 
root@shanxin:~
root@shanxin:~
root@shanxin:~
文件系统       类型     大小  已用  可用 已用% 挂载点
tmpfs          tmpfs    388M  1 .9M  386M    1 % /run
/dev/sda3      ext4      20G   12G  6 .6G   64 % /
tmpfs          tmpfs    1 .9G     0   1 .9G    0 % /dev/shm
tmpfs          tmpfs    5 .0M  4 .0K  5 .0M    1 % /run/lock
/dev/sr0       iso9660  4 .7G  4 .7G     0   100 % /ubuntu
/dev/sda2      vfat     512M  6 .1M  506M    2 % /boot/efi
tmpfs          tmpfs    388M   76K  387M    1 % /run/user/128
tmpfs          tmpfs    388M   60K  388M    1 % /run/user/0
root@shanxin:~
root@shanxin:~
现把 /ubuntu/ 作为了 CD-ROM 的挂载点
正在鉴别.. . [ a84ef5cfae2bd0b19f1d5d3dcb51b195-2] 
正在盘片中查找索引文件.. .
找到了 4  个软件包索引、0 个源代码包索引、0 个翻译索引和 1  个数字签名
root@shanxin:/etc/apt
deb cdrom:[ Ubuntu 22.04 .4 LTS _Jammy Jellyfish_ - Release amd64 ( 20240220 ) ] / jammy main restricted
deb file:///ubuntu jammy main restricted
root@shanxin:/etc/apt
正在读取软件包列表.. . 完成
正在分析软件包的依赖关系树.. . 完成
正在读取状态信息.. . 完成
所有软件包均为最新。
root@shanxin:/etc/apt