debian12学习笔记

发布于:2024-12-18 ⋅ 阅读:(88) ⋅ 点赞:(0)

前置条件

基于debian12官网的qcow2格式文件进行操作

安装ssh

登录虚拟机后安装ssh服务端

apt install openssh-server

配置国内源

新增/etc/apt/sources.list.d/tsinghua.list
使用清华大学的源
https://www.cnblogs.com/shanhubei/p/18104430

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware 
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware 
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware 
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

扩容

系统盘只有2G,需要扩下

虚拟机虚拟介质扩容量

先在virtualbox中对系统盘扩容到10G
在这里插入图片描述
在这里插入图片描述

linux系统内部扩容

1、下载parted命令
2、扩容
参考https://blog.csdn.net/qq_45664055/article/details/137920769
parted输入后使用resizepart 命令进行扩
3、调整文件系统
ext4的使用resize2fs

resize2fs /dev/sda1

4、使用df -h命令查看发现已经扩容OK了

设置时区

root用户下执行

timedatectl set-timezone 'Asia/Shanghai'

编辑颜色

编辑~/.bashrc
放开以下几行的注释后重新登录即可。

 export LS_OPTIONS='--color=auto'
 eval "$(dircolors)"
 alias ls='ls $LS_OPTIONS'
 alias ll='ls $LS_OPTIONS -l'


网站公告

今日签到

点亮在社区的每一天
去签到