title: "Linux基础设置"
date: 2021-02-01
tags: ["linux","debian"]
categories: ["linux","debian"]
更新软件包
apt-get update && apt-get upgrade -y
apt-get -y install vim #先来个vim舒服一下
vi ~/.vimrc
启用鼠标
:set mouse-=a
粘贴以下内容
if has('mouse')
set mouse-=a
endif
syntax on
filetype indent on
set showcmd
set showmatch
set incsearch
set syn=cpp
set nu!
set hlsearch
set nobackup
set ruler
colorscheme evening
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set enc=utf-8
set fenc=utf-8
set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set langmenu=zh_CN.UTF-8
set helplang=cn
保存走你
vi /etc/bash.bashrc
vi ~/.bashrc
找到并注释掉类似于如下内容
if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
并在下面添加
PS1="\[\e[37;1m\][\[\e[35;1m\]\u\[\e[32;1m\]@\[\e[34;1m\]\h \[\e[31;1m\]\w \[\e[33;1m\]\t\[\e[37;1m\]]\[\e[32;1m\]\$\[\e[m\]"
保存走你
source /etc/bash.bashrc
source ~/.bashrc
来个系统信息查看
apt-get -y install screenfetch
screenfetch
基础完毕 enjoy :)
Q.E.D.