✨
eallion's Docs
  • README
  • Nginx
    • Typecho Nginx Rewrite
  • Gmail
    • 如何自动删除重复的邮件
  • Windows
    • 在此目录打开 CMD 命令提示符
  • README
    • git push 免密码
  • Ubuntu
    • Ubuntu2010
  • HTML
    • HTML Sample
  • Hugo
    • 本地调试(Web Server)
    • Hugo 构建命令
  • Openwrt
    • 编译 lean openwrt 步骤记录
由 GitBook 提供支持
在本页
  • Ubuntu 20.10 优化
  • 基础优化
  • 1、换软件源
  • 2、系统设置
  • 3、Sudo 免密码
  • 4、安装基础软件
  • 5、去鼠标加速
  • 6、安装显卡驱动
  • 7、下载个人配置
  • 8、安装输入法
  • 9、双系统时间设置
  • 10、安装 Guake
  • 11、安装 Oh My Tmux
  • 12、安装 Oh My Zsh
  • 13、配置 Vim
  • 14、配置 Grub 引导
  • 15、自动挂载硬盘
  • 16、安装 PulseAudio Volume Control
  • 17、安装 Docker
  • 18、安装 Gnome Shell Extensions
  • 19、火焰截图 Flameshot
  • 20、体验 macOS Big Sur 动态壁纸
  • 安装软件
  • 安装常用软件

这有帮助吗?

  1. Ubuntu

Ubuntu2010

上一页Ubuntu下一页HTML

最后更新于3年前

这有帮助吗?

Ubuntu 20.10 优化

安装 Ubuntu 后的 20 件事

Ubuntu 20.10

最近搞挂了一块数据盘,刚好在 Ubuntu 20.10 的发行时间点,索性重装 Ubuntu。 本文主要为备忘。切勿照搬命令。建议最小化安装。

基础优化

1、换软件源

推荐清华大学的源

个人的备份源

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
wget -c https://raw.githubusercontent.com/eallion/dotfiles/ubuntu/sources.list -O /etc/apt/sources.list

然后 update 一下:

sudo apt update
sudo apt upgrade

2、系统设置

在系统设置里按自己的习惯设置即可。

3、Sudo 免密码

常用的个人电脑,是可以运行sudo免输密码的,公用电脑不建议这样设置。

su -
nano /etc/sudoers

在root ALL=(ALL:ALL) ALL下一行添加: (eallion请替换成自己的用户名)

eallion ALL=(ALL:ALL) ALL

在%sudo ALL=(ALL:ALL) ALL下一行添加: (eallion请替换成自己的用户名)

eallion ALL=(ALL:ALL) NOPASSWD:ALL

4、安装基础软件

sudo apt install vim \
                 git \
                 curl \
                 gnome-tweak-tool \
                 gdebi \
                 preload \
                 google-chrome-stable \
                 gnome-shell-extensions \
                 ubuntu-restricted-extras

5、去鼠标加速

对于 FPS 玩家,尤其推荐去掉鼠标加速。 5.1. 在 GNOME Tweaks 点击 键盘和鼠标 在 鼠标-加速配置里选择Flat。 5.2. 在 系统设置里设备-鼠标和触摸板-鼠标-鼠标速度调节自己适应的鼠标速度。

6、安装显卡驱动

如果是 Nvidia 独立显卡,在 Dash 里搜索drive,打开附加驱动,选择专有驱动。

7、下载个人配置

基于 Linux 特性,备份配置文件即可。 我的部分配置备份于 GitHub:

git clone https://github.com/eallion/dotfiles.git -b ubuntu ~/Documents/dotfiles

恢复 Git Vim Tmux Fcitx 等配置。

8、安装输入法

个人使用 Fcitx 五笔拼音

8.1、Fcitx 五笔拼音

sudo apt install fcitx-table-wbpy

配置默认输入法:

im-config

自定义标点符号:

wget -c https://raw.githubusercontent.com/eallion/dotfiles/ubuntu/.config/fcitx/data/punc.mb.zh_CN -O ~/.config/fcitx/data/punc.mb.zh_CN

按下面格式添加符号,如果不符合习惯请自行修改。

~ ~
` `
! !
@ @
# #
$ ¥
% ␣
^ ……
& &
* *
( (
) )
_ ——
- -
+ +
= =
| |
\ 、
[ 【
] 】
{ 〖 
} 〗
: :
; ;
" “ ”
' ‘ ’
< 《
> 》
, ,
. 。
? ?

8.2、Fcitx5 五笔拼音

安装:

sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-gtk2 fcitx5-frontend-gtk3 fcitx5-frontend-qt5
`

切换输入法:

im-config

安装 Psionics-Remix 主题(可选)

git clone https://github.com/xTpx/Psionics-Remix.git ~/.local/share/fcitx5/themes/Psionics-Remix
vim ~/.config/fcitx5/conf/classicui.conf

配置主题:

 ***
Theme=Psionics-Remix
 ***

自定义快速输入:

sudo vim /usr/share/fcitx5/data/quickphrase.d/quick.mb

在文件中添加形如input output的代码,一行一条,即可实现添加快速输入辞典。 示例:要在快速输入中输入ddrr,在候选中显示大大的小蜗牛,只需在上述mb文件中添加一行ddrr 大大的小蜗牛即可。(注意空格) 友情提示:快速输入可以使用分号打开,Rime不支持快速输入。

9、双系统时间设置

解决切换到 Windows 时间不对的问题。将本地时间更新到硬件上。

sudo apt install ntpdate
sudo ntpdate ntp.aliyun.com # 阿里云的时间服务器,可用其他时间服务器替换
sudo hwclock --localtime --systohc

前9个步骤执行完成后,建议重启一下!

10、安装 Guake

通过软件仓库直接安装的 Guake 版本不够新,而且中文显示不全。 推荐源码安装:

git clone https://github.com/Guake/guake.git ~/Documents/guake
cd ~/Documents/guake
./scripts/bootstrap-dev-debian.sh run make
make
sudo make install

Ubuntu 20.10 默认终端的背景色:#300a24

Guake indicator 如果有需要可安装 Guake indicator:

sudo apt install guake-indicator

11、安装 Oh My Tmux

cd
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .

12、安装 Oh My Zsh

安装 Zsh:

sudo apt update
sudo apt install zsh autojump fasd

安装 Oh My Zsh:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

下载、安装、配置字体:

安装主题 Powerlevel9k :

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

安装历史命令建议插件:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

安装命令行语法高亮插件:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

设置 Oh My Zsh :

vim ~/.zshrc

需要修改如下几个地方:

    ******
POWERLEVEL9K_MODE='nerdfont-complete'
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir dir_writable disk_usage vcs newline)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
    ******
ENABLE_CORRECTION="true"
    ******
COMPLETION_WAITING_DOTS="true"
    ******
plugins=( git extract fasd zsh-autosuggestions zsh-syntax-highlighting docker docker-compose)
    ******

我个人的配置:

rm ~/.zshrc
wget -c https://raw.githubusercontent.com/eallion/dotfiles/ubuntu/.zshrc -O ~/.zshrc

让配置生效:

source ~/.zshrc

如果安装时没有选择将 Zsh 作为默认 Shell,可以用下面的命令设置:

chsh -s /bin/zsh

查看当前所用的 Shell : echo $SHELL。

13、配置 Vim

13.1 spf13-vim

13.2 EverVim (推荐)

安装 EverVim 步骤 安装依赖:

sudo apt install -y git curl python3-pip python3-dev exuberant-ctags cmake gcc g++ build-essential

安装 EverVim :

curl -sLf https://raw.githubusercontent.com/LER0ever/EverVim/master/Boot-EverVim.sh | bash

进 Vim 安装插件:

vim
:PlugInstall

如果进 Vim 提示 Your ycmd is shut down ,需要安装 You Compute Me :

cd ~/.vim/bundle/YouCompleteMe
python3 install.py --clang-completer

14、配置 Grub 引导

Etx4 文件系统用 Grub-customizer 即可,Btrfs、ZFS等文件系统此软件无效。

sudo apt install grub-customizer

Theme:

如果 Nvidia 独立显卡在引导界面开机黑屏:将nomodeset加到/etc/default/grub即可。

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet splash"

15、自动挂载硬盘

查看硬盘的 UUID 和 Type :

sudo blkid

记录下UUID和Type。 创建挂载目录:

mkdir -p ~/Files ~/Media

查看自己的 uid gid:

id eallion

编辑配置文件:

sudo vim /etc/fstab

按格式添加:

UUID=xxxx    /mount-folder    type    defaults    0    0

如:

UUID=xxxx    /home/eallion/Files    ntfs    defaults,uid=1000,gid=1000,umask=022    0    0
UUID=xxxx    /home/eallion/Media    ntfs    defaults,uid=1000,gid=1000,umask=022    0    0

如果不加 uid gid ,自动挂载后可能是 root 权限,无法读写。

16、安装 PulseAudio Volume Control

sudo apt install pavucontrol

17、安装 Docker

sudo apt remove docker docker-engine docker.io containerd runc
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install -y docker-ce docker-ce-cli containerd.io

检查是否安装成功:

docker version
sudo docker run hello-world
`

安装 Docker Compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Docker 属于高频操作,运行 Docker 时,免去 sudo

sudo groupadd docker
sudo usermod -aG docker $USER
reboot
newgrp docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R

18、安装 Gnome Shell Extensions

18.1. 安装浏览器插件

可以使用 Chrome 插件,如果登录了 Google 账号,有自动同步功能。

18.2. 安装 Gnome Shell Extensions

sudo apt install gnome-shell-extensions

18.3. 安装扩展

以下扩展插件按需启用 安装完成后,按Alt+F2,输入r重启

    • sudo gnome-extensions disable ubuntu-dock@ubuntu.com

    • sudo apt install gir1.2-lunar-date-2.0

19、火焰截图 Flameshot

需要设置快捷键,所以把火焰截图单独拿出来说。

sudo apt install flameshot

设置截图快捷键: 系统设置 - 设备 - 键盘快捷键 - 自定义快捷键 点加号添加一个:

名称:flameshot
命令:flameshot gui
设置快捷键:(按键盘设置)

20、体验 macOS Big Sur 动态壁纸

20.1、下载 Big Sur

git clone https://github.com/eallion/Big-Sur-Ubuntu.git ~/Pictures/Big-Sur-Ubuntu

20.2、设置

打开Gnome Tweaks 找到外观-背景 选择groovy.xml(文件在/home/username/Pictures/Big-Sur-Ubuntu/groovy.xml路径) 选择Zoom调整方式

安装软件

安装常用软件

推荐一些常用的软件:

  • Authy (Snap)

    sudo snap install authy --beta
  • Filezilla

    sudo apt install filezilla
  • PhotoGIMP (GIMP)(Snap)

    sudo snap install photogimp
  • Steam

    sudo apt install steam
  • Telegram

    sudo apt install telegram-desktop
  • Thunderbird

    sudo apt install thunderbird thunderbird-locale-zh-cn
  • Virtualbox

    sudo apt install virtualbox
  • VLC

    sudo apt install vlc
  • AppImage Launcher

  • Docker

  • Dropbox

  • Go

  • Hugo

  • Keybase

  • MouseWheel

  • Neteasy 网易云音乐

  • Nginx Mysql PHP

  • NVM

  • OBS

  • PicGo (snap install with --danderous)

  • qBittorrent Enhanced

  • QQ

  • Slack

  • Spofity

  • Termius

  • Typora

  • Visual Studio Code

实机安装 桌面效果截图

主题: 主题:

参考:

官方文档

下载: 下载: (推荐)

Ubuntu 配置 EverVim

Ubuntu 20.10 暂时还没有官方源,使用 Ubuntu 20.04 的源替代。 即:替换$(lsb_release -cs)为focal。

Chrome :

Firefox:

里有此功能。

实际上没什么卵用,个人也不太喜欢。 Gnome 桌面环境原生支持按时间自动切换壁纸的功能。 无论什么 Linux 发行版,只要使用 Gnome 桌面环境都可以使用此壁纸。 此套壁纸支持5K分辨率。 Windows 可以使用 。

通过 Snap 仓库安装有中文输入 Bug 。

(查看大图)
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
https://raw.githubusercontent.com/eallion/dotfiles/ubuntu/sources.list
https://github.com/eallion/dotfiles
https://github.com/Yucklys/fcitx-nord-skin
https://github.com/Sakitami/fcitx-themes-package
https://github.com/xTpx/Psionics-Remix
https://github.com/gpakosz/.tmux
https://eallion.com/ubuntuzsh
https://github.com/ohmyzsh/ohmyzsh#basic-installation
Ubuntu Nerd Font
Knack Nerd Font Mono
https://github.com/spf13/spf13-vim
https://github.com/LER0ever/EverVim
https://eallion.com/ubuntuevervim/
https://github.com/sandesh236/sleek--themes
https://github.com/gustawho/grub2-theme-breeze
https://docs.docker.com/engine/install/ubuntu/
https://docs.docker.com/engine/install/linux-postinstall/
GNOME Shell integration
https://extensions.gnome.org
Applications Menu
Applications Overview Tooltip
Auto Move Windows
Clipboard Indicator
Coverflow Alt-Tab
Dash to Dock
Desktop Icons
GSConnect
Hide Top Bar
Horizontal workspaces
Launch new instance
Lunar Calendar 农历
Native Window Placement
OpenWeather
Places Status Indicator
Removable Drive Menu
Remove Alt+Tab Delay v2
Remove Dropdown Arrows
Unite
Screenshot Window Sizer
Sound Input & Output Device Chooser
Status Area Horizontal Spacing
TopIcons Plus
Tray Icons
Ubuntu AppIndicators
Ubuntu Dock
Unite
User Themes
Vitals
Window List
windowNavigator
Workspace Indicator
WinDynamicDesktop
https://github.com/eallion/Big-Sur-Ubuntu
https://github.com/TheAssassin/AppImageLauncher/
https://docs.docker.com/engine/install/ubuntu/
https://www.dropbox.com/install
https://golang.org/doc/install
https://github.com/gohugoio/hugo/releases
https://keybase.io/docs/the_app/install_linux
https://github.com/muharemovic/MouseWheel
https://music.163.com/#/download
https://eallion.com/ubuntu2004lnmp/
https://github.com/nvm-sh/nvm
https://obsproject.com/wiki/install-instructions#linux
https://github.com/Molunerfinn/PicGo
https://github.com/c0re100/qBittorrent-Enhanced-Edition
https://github.com/poplite/qBEE-Ubuntu-Packaging
https://im.qq.com/linuxqq/index.html
https://slack.com/downloads/linux
https://www.spotify.com/us/download/linux/
https://termius.com/linux
https://typora.io/#linux
https://code.visualstudio.com/Download