5步教你完成linux 配置中文输入法(以搜狗为例)

因为有些设置需要root账号,所以干脆一开始就进入root

sudo -s

STEP1:关于源的更新

问A:为什么要更新源?

答A:

1、因为linux安装软件比较慢,所以更换一些国内的源会加快安装速度

2、由于某些源网址的版本比较老或者没有,可以更新源来获取想要的版本

问B:怎么更新源?

答B:

1、输入下面的命令打开vim编辑器,编辑器会覆盖原来的终端窗口,不用怕,直接粘贴源即可

vim /etc/apt/source.list

2、复制粘贴源(在下面随便选几个源粘贴就好了,我这里选用了阿里云的源)

#阿里云源

deb http://mirrors.aliyun.com/kali sana main non-free contrib

deb http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free

deb-src http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free

3、保存并关闭vim编辑器

摁【ESC】然后再输入【:wq】保存并退出

【科普VIM编辑器几个命令行】

:w        #write- 写入信息,不退出 vim
:w file  #write to file-写入file,不退出 vim
:w!      #强制写入,不退出vim
:wq     #(write and quite)写入并退出 vim
:wq!    #强制写入并退出 vim
:q       #(quit)-不写入直接退出 vim
:q!      #不写入,强制退出 vim
:e!      #(empty)-清空所有操作

4、更新源配置

apt-get update

问C:我们一般用哪些源?

答C:现在比较全以及流行的源有:阿里源,中科大源,清华源和163源等(小知识:deb +网址下载的是deb包,deb-src +网址下载的是deb包的源文件,几乎没差)

Ubuntu apt源

阿里源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

中科大源:
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

163源:
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
————————————————
版权声明:本文为CSDN博主「atd_」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u012152776/article/details/123572629

STEP2:安装依赖包fcitx

apt-get install fcitx

一般会成功,如果出现依赖错误则输入下面的代码

apt-get -f install fcitx

如果还不行,就是源的问题,更换下源再重复这一步

STEP3:到官网下载SOGOU或者其他输入法(记得选择适合自己系统的包)

到包所在的目录下打开终端输入:

dpkg -i+sogo安装包的文件名

STEP4:输入法配置

1、终端输入以下命令进入到输入法配置,这时候可能会提示你安装下config,同意Y,一直下一步即可。

im-config

 2、安装完会弹出一个窗口:system configuration select选择name为fcitx,点OK

STEP5:注销电脑账户重新登入

1、主屏幕右上角会出现小键盘logo,则表示安装基本成功

2、点右上角键盘,进入configure设置,左下角摁【+】,搜索SOGOU,然后添加(如果搜不到,取消only那个√应该就可以了),到这一步成功,快捷键CTRL+空格,即可切换到中文输入,之后shift键可自由切换中英文输入。

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