Ubuntu安装与配置

Step0 设置root账户

sudo passwd root

Step1 换源

换用国内源,进行加速。

sudo gedit /etc/apt/sources.list

清华源地址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
Ubuntu 20.04LTS

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

替换后执行更新:

sudo apt update && sudo apt upgrade

Step2 安装新立得并使用快速搜索

新立得(Synaptic)是Debian和Ubuntu Linux操作系统的包管理工具apt的图形化前端
方法一:在ubuntu软件商店搜索synaptic安装
方法二:使用CLI

sudo apt install synaptic

打开新立得并安装apt-xapian-index

Step3 优化

1.强制尽可能使用RAM提高速度

Ubuntu 的 Swappiness 参数决定了 Swap 分区如何使用,当 Swappiness = 0 时,表示最大限度使用物理内存,然后才使用 Swap,当 Swappiness = 100 时,表示最大限度使用 Swap,然后才使用物理内存,这个值的初始值是 60,用 Swap 比较多,性能会差些,最好改成 10,尽量先用物理内存。

sudo gedit /etc/sysctl.conf
在最后一行加上
vm.swappiness=10

2.使用硬盘缓存

1.打开Ubuntu的Disk应用
2.选择所在的硬盘,右上角设置中选择写入缓存,打开此功能。

3.减少SSD写入

sudo gedit /etc/fstab
除去交换区外,在每一个<pass>下的内容前面加入:
noatime,

4.文件系统英文化

使用Ubuntu中文后会使得部分文件家中文,比如/桌面,/文档这种形式,会使得CLI时来回切换中英文很麻烦,并且部分不支持中文的软件在目录上最后可能出现未知问题。我们可以通过设置两次设置中英文来解决。

1.在语言支持中设置English为第一位,然后应用整个系统,并重启。
2.重启后,弹窗提示更新文件夹名称,选择更新,接着在语言支持中设置汉语为第一位,然后应用整个系统,并重启。
3.重启后,弹窗提示更新文件夹名称,选择保留,并勾选不再弹出提示。

5.界面优化

安装以下插件
dconf-editor 
gnome-tewak-tools
chrome-gnome-shell

1.激活最小化:

dconf-editor>org>shell>extensions>dash-to-dock>click-action>minimize

2.任务栏底端正常化

dconf-editor>org>shell>extensions>dash-to-dock>show-apps-at-top>on

3.美化插件
转到网站:extensions.gnome.org

安装以下插件
Dash to Panel
Arc Menue
User Themes 

4.主题安装

添加以下源:
ppa:daniruiz/flat-remix
安装以下:
flat-remix
flat-remix-gnome
flat-remix-gtk

转到网站:gnome-look.org
5.笔记本电源优化

安装tlp
启动tlp
sudo tlp start

6.护眼模式

sudo apt install redshift
sudo gedit ~/.config/redshift.conf
添加以下内容:
[redshift]
; 白天屏幕温度
temp-day=5800
; 夜晚屏幕温度
temp-night=4600
; 昼夜是否平滑过度(1/0)
transition=1
; 全局屏幕亮度
;brightness=0.9
; 昼夜屏幕亮度(version >= 1.8)
brightness-day=0.9
brightness-night=0.7
; 屏幕gamma
gamma=0.9
; 位置提供方式(redshift -l list)
location-provider=manual
; 调整工具(redshift -m list)
adjustment-method=randr
[manual]
; 位置提供方式设置
; 经纬度(北京)
lat=39.90
lon=116.41
; 屏幕调整工具设置
; 第1 块屏幕(0)
[randr]
screen=0

7.缩放问题

优化>字体>缩放>1.25

8.双系统换启动顺序
Ubuntu双系统默认Ubuntu为第一启动顺序,修改方法如下:

sudo gedit /etc/default/grub
修改GRUB_DEFAULT=0的值为Windows的顺序。
sudo update-grub

Step4 软件安装

常用库和软件:

sudo apt install tree htop openssl ssh git cmake clang lua5.3 openjdk-11-jdk screenfetch make build-essential gcc g++ gdb python3-pip vim nano

vim配置:
https://gitee.com/chxuan/vimplus?_from=gitee_search
vlc 视频播放
wps for linux 办公
linuxQQ 聊天
texstudio latex编写
qt5 Qt编程
VS Code IDE编辑
kdenlive Pr软件
gimp Ps软件
kazam 录屏
pinta 画图板
typora markdown编辑
font-manager 字体批量安装
gufw 防火墙
bleachbit 垃圾清理

wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update
sudo apt-get install typora

Stream(CS:GO Dota2) 0.A.D 游戏
deepin-wine 国产常用软件:
https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu
deepin官方软件源仓库地址:
https://packages.deepin.com/deepin/pool/non-free/d/

posted @ 2020-12-28 20:46  KINGES  阅读(391)  评论(0编辑  收藏  举报