deb http://mirrors.aliyun.com/debian stretch main contrib non-free deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free deb http://mirrors.aliyun.com/debian stretch-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian stretch-backports main non-free contrib deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
接下来执行:
sudo apt update sudo apt dist-upgrade
然后确认一下,就是漫长的等待了。下载完所有的安装包之后,会有一个升级列表说明,看不看无所谓了,直接输入 q 就可以退出继续了。后面会遇到几处确认,因为是新装的系统,所以没什么顾及,都选 Y 就可以了。
set completeopt=longest,menu"自动补全配置,让Vim的补全菜单行为与一般IDE一致 set cursorcolumn "突出显示当前列,可用Ctrl+m切换是否显示 set cursorline "突出显示当前行,可用Ctrl+m切换是否显示 sethistory=3000"history存储长度 setnu"显示行数 setshiftwidth=4"换行时行间交错使用4空格 setcindentshiftwidth=4"自动缩进4空格 set tabstop=4"让一个tab等于4个空格 set showmatch "显示括号配对情况 set autoread "当文件在外部被改变时,Vim自动更新载入 set noswapfile "关闭交换文件 set showmode "开启模式显示 set cmdheight=1"命令部分高度为1 set shortmess=atI "启动的时候不显示那个援助索马里儿童的提示 set t_ti= t_te= "退出vim后,内容显示在终端屏幕 set novisualbell "don't beep set noerrorbells "don't beep
set wildmode=list:longest set ttyfast
set wildignore=*.swp,*.bak,*.pyc,*.class set scrolloff=3"至少有3行在光标所在行上下
set selection=old set selectmode=mouse,key set viminfo^=% "Remember info about open buffers on close set viminfo+=! "保存全局变量 set magic "正则表达式匹配形式
"autocmd InsertEnter * se cul "用浅色高亮当前行 set ruler "显示标尺 set showcmd "输入的命令显示出来,看的清楚些
"设置标记一列的背景颜色和数字一行颜色一致 hi! link SignColumn LineNr hi! link ShowMarksHLl DiffAdd hi! link ShowMarksHLu DiffChange
set hlsearch "高亮显示结果 set incsearch "在输入要搜索的文字时,vim会实时匹配
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " F1 - F4 设置 " F1 废弃这个键,防止调出系统帮助 " F2 行号开关,用于鼠标复制代码用 " F3 换行开关 " F4 粘贴模式paste_mode开关,用于有格式的代码粘贴 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" I can type :help on my own, thanks. Protect your fat fingers from the evils of <F1> nnoremap<F1><Esc>" nnoremap<F2> :set nonumber! number?<CR> nnoremap<F3> :set wrap! wrap?<CR> set pastetoggle=<F4>"when in insert mode, press <F5> to go to "paste mode, where you can paste mass data "that won't be autoindented au InsertLeave * set nopaste
" disbale paste mode when leaving insert mode
"Treat long lines as break lines (useful when moving around in them) "se swap之后,同物理行上线直接跳 nnoremapk gk nnoremap gk k nnoremapj gj nnoremap gj j nnoremap<Up> gk nnoremap<Down> gj
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples
# If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac
# don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000
# check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1) #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi
# enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval"$(dircolors -b ~/.dircolors)" || eval"$(dircolors -b)" alias ls='ls --color=auto' alias dir='dir --color=auto' alias vdir='vdir --color=auto'
alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias cat='ccat --color=always --bg=dark' alias top='htop' fi
# colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF' alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' alias fuck='TF_CMD=$(TF_ALIAS=fuck PYTHONIOENCODING=utf-8 TF_SHELL_ALIASES=$(alias) thefuck $(fc -ln -1)) && eval $TF_CMD && history -s $TF_CMD'
# Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi
# enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi
if [ -f `which powerline-daemon` ]; then powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 . /usr/share/powerline/bindings/bash/powerline.sh fi
neofetch
然后退出再登录,就可以看到酷炫的命令提示符了。还有彩色的 ls, cat, top, man 等。还可以使用 fuck 命令来纠正输入错误。