Linux 安装后优化

965次阅读
没有评论

Linux 安装后优化

安装常用软件

所有操作都是在 root 权限操作,如果你不是 root 权限自己加 sudo

apt install vim git curl wget zsh net-tools

系统更改

## 修改时区
timedatectl set-timezone "Asia/Shanghai"

zsh 配置


配置插件
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
启用插件
vim ~/.zshrc
## 编辑配置
# 主题更改(ZSH_THEME=)ZSH_THEME="crcandy"
# 启用插件
plugins=(
        git
        kubectl
        zsh-autosuggestions
        zsh-syntax-highlighting
)

vim 配置

vim ~/.vimrc
## 简单配置文件
syntax on
set tabstop=4
set ic
set nu
set expandtab
set cindent shiftwidth=4
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8

源配置

# 备份源
mv /etc/apt/sources.list /etc/apt/sources.list.back
# 添加源
vim /etc/apt/sources.list
## 添加内容
# 默认注释了源码仓库,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb-src http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

# backports 软件源,请按需启用
# deb http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
正文完
 0
评论(没有评论)