Ubuntu 基础配置

目录

源配置

安装sougo输入法

需要安装的基础软件

基础命令

VIM基础配置


源配置

源路径:

/etc/apt/sources.list

aliyun源 20.04

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

安装sougo输入法

全网最准确的Ubuntu 20.04 安装搜狗输入法的步骤

需要安装的基础软件

sudo apt install bzip2 libbz2-dev liblzma-dev build-essential libssl-dev libffi-dev python-dev build-essential curl gnupg2 lsb-release

基础命令

#查看CPU架构
$ uname -m

x86_64



#查看版本号等信息
$ lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal


#添加alternative命令选项
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-20/bin/java 1084


#切换alternative命令版本
$ sudo update-alternatives --config java

#查找软件包
$ apt search [软件包名]

#判断软件包是否安装软件包
$ dpkg -s [软件包名]

VIM基础配置

sudo vim /etc/vim/vimrc.local # 应用全局


"
" 自定义 VIM 基础配置
"
" 设置编码
set encoding=utf-8
set termencoding=utf-8
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
" 高亮光标行
set cursorline
" 显示行号
set number
" 括号匹配
set showmatch
" 自动缩进
set autoindent
" 显示光标当前位置
set ruler
" 缩进改为空格
set expandtab
" tab宽度
set tabstop=4
" 自动缩进长度
set shiftwidth=4
" 显示空格与tab
set listchars=tab:>-,trail:-
" 显示状态栏
set laststatus=2
" 显示当前行行号,其他行显示相对行号
" set relativenumber
" 垂直滚动时,当前行相对于底部的距离
set scrolloff=5
" 搜索时,高亮匹配
set hlsearch
" 输入搜索模式,每次自动匹配结果
"set incsearch
" 需要记录的VIM历史操作个数
set history=500
" 打开文件监视,防止外部篡改
set autoread
" 侦测文件类型
filetype on

你可能感兴趣的:(ubuntu,linux,运维)