0
点赞
收藏
分享

微信扫一扫

Debian个人使用入门

十日十月Freddie 2022-03-11 阅读 33
linux

主要是docker镜像普遍使用debian作为基础镜像,所以还是稍微学习下吧

查看debian系统版本:

cat /etc/os-release

安装软件

#网络安装
apt-get install -y xxx

#本地安装软件
dpkg -i xxx.deb

#查看已安装软件
dpkg -l xxx

下载deb格式的软件及查找依赖包

- https://pkgs.org/
- https://www.debian.org/distrib/packages

各版本区别

  • sid :最新版本
  • buster:debian10
  • Bullseye: debian 11

另:如何在Dockerfile下使用apt-get install

#在Dockerfile中写入
RUN cd / && mkdir /opt/pkgs \
&& echo deb http://ftp.cn.debian.org/debian buster main > /etc/apt/sources.list \
&& echo deb http://ftp.cn.debian.org/debian buster-updates main >> /etc/apt/sources.list \
&& echo deb http://ftp.cn.debian.org/debian-security/ buster/updates main >> /etc/apt/sources.list \
&& echo deb http://ftp.cn.debian.org/debian buster-backports main >> /etc/apt/sources.list \
&& apt-get update && apt-get install cron -y && apt-get install curl -y && apt-get install procps -y
举报

相关推荐

0 条评论