linux使用过程中的一些小笔记
mount -t btrfs -o subvol=/@,compress=zstd /dev/nvmexn1p1 /mnt # 挂载 / 目录
mkdir /mnt/home # 创建 /home 目录
mount -t btrfs -o subvol=/@home,compress=zstd /dev/nvmexn1p1 /mnt/home # 挂载 /home 目录
mkdir -p /mnt/boot # 创建 /boot 目录
mount /dev/nvmexn1p2 /mnt/boot # 挂载 /boot 目录
swapon /dev/nvmexn1p3 # 挂载交换分区
arch-chroot /mntxdg-user-dirs-update创建:Desktop,Documents,Downloads,Music,Pictures,Videos目录
创建文件/etc/systemd/system/getty@tty1.service.d/autologin.conf,填写下面内容:
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin KicamonIce %I $TERM- 启动startx:在bashrc或者zshrc中添加
[ $(tty) = "/dev/tty1" ] && cd ~ && startx- 启动图形界面(以dwm为例):在
~/.xinitrc末尾添加exec dwm
创建文件sudo nano /etc/X11/xorg.conf.d/00-keyboard.conf,填写下面内容:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbOptions" "caps:swapescape"
EndSection- 更改等待时间
sudo nvim /etc/systemd/system.conf将DefaultTimeoutStopSec这一项取消注释,把时间改成30s
- 执行
执行
sudo systemctl daemon-reload
sudo timedatectl set-ntp true
检测网络是否连接
nmcli -t -f NAME,DEVICE,STATE connection show --active输出(有网络)
网络名:网卡名:activatedxdg-mime default thunar.desktop inode/directory- 安装opentabletdriver
- 启动
otd-daemon &
otd-gui- 内核选择:linux-zen
- 一些内核黑客合作的结果,是适合日常使用的优秀内核
- 以吞吐量和功耗为代价来换取性能
- 相对 linux 内核加入了 Fsync 功能,在一些采用 .Net 的 wine 游戏中会有 明显的性能提升
- 性能监控:mangohud
- 常规启动方式
mangohud 游戏 - steam:在 Steam 库中右键游戏封面 > 点击
属性...> 侧边栏通用> 在启动选项中添加MANGOHUD=1 %command%
- 常规启动方式
- 拉取镜像:到docker hub官网上拉取即可,如debian:
podman pull docker.io/debian - 查看镜像:
docker images命令可以列举本地的镜像 - 创建并运行debian容器:
podman run -it --name debian_dev debian bash(debian_dev为容器名,可以任意取名) - 列举本地容器:
podman ps:查看正在运行的容器podman ps -a:查看所有的容器
- 运行本地容器:
podman start debian_devpodman attach debian_dev