Must be Installed Apps of Ubuntu

前言

Ubuntu上一些基础app的安装

ZSH

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 安装本体
$ apt install zsh

$ sudo chsh -s $(which zsh) $(whoami)
# 切换之后需要注销Ubuntu才能生效

# Oracle Linux 需要用下面的命令切换(非root)
$ sudo usermod -s /bin/zsh yourusername

# 20210203发现这样的安装,在terminal里依旧选不到安装的powerline-fonts
$ sudo apt install powerline-fonts
# 修改为这种方式安装↓
$ git clone https://github.com/powerline/fonts.git
$ cd fonts
$ ./install.sh
$ rm -rf fonts

# 安装 oh_my_zsh(git被墙,国外可以直接用,国内见下方)
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# 站点被X,所以,网页访问下载: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
$ chmod u+x install.sh
$ bash install.sh

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

# 语法高亮:autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# 跳转工具:AutoJump
$ sudo apt install autojump
# 用法:跳转到目录
j dir
# 可以通过GUI文件管理器打开指定目录,执行命令:
jo dir

# 跳转工具:fasd
$ sudo apt install fasd
# 用法
alias f='fasd -f' # 文件
alias d='fasd -d' # 目录
alias a='fasd -a' # 任意
alias s='fasd -si' # 显示并选择

alias sd='fasd -sid' # 选择目录
alias sf='fasd -sif' # 选择文件
alias z='fasd_cd -d' # 跳转至目录
alias zz='fasd_cd -d -i' # 选择并跳转至目录


$ sudo nano ~/.zshrc

# 添加插件
plugins=(
git fasd zsh-autosuggestions zsh-syntax-highlighting extract
)

# 推荐主题
ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" "ys" "pygmalion" "rixius")

打印当前系统的logo

1
2
3
4
$ sudo apt install screenfetch -y
# or
$ sudo apt install neofetch -y
# 在.zshrc文件最后面加上 screenfetch 或者 neofetch

输入法

输入法推荐使用小狼毫RIME

1
2
3
4
5
6
7
8
9
10
11
$ sudo apt-get install ibus-rime
$ ibus restart
$ ibus engine rime

# 候选词竖排改横排:
$ nano ~/.config/ibus/rime/build/ibus_rime.yaml

style:
horizontal: true

$ ibus restart

Qv2ray

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Install some prerequisites needed by adding GPG public keys
$ sudo apt-get install gnupg ca-certificates curl

# Import our GPG key. Notice the hyphen at the end of line.
$ curl -sSL https://qv2ray.github.io/debian/pubkey.gpg | sudo apt-key add -

# Add the our official APT repository:
# [arch=amd64] ,强制64位,否则会出现: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://qv2ray.github.io/debian stable InRelease' doesn't support architecture 'i386'的报错
$ echo "deb [arch=amd64] https://qv2ray.github.io/debian/ stable main" | sudo tee /etc/apt/sources.list.d/qv2ray.list

# echo "deb https://qv2ray.github.io/debian/ unstable main" | sudo tee /etc/apt/sources.list.d/qv2ray.list (for debian testing/unstable and Ubuntu 20.10+)

# To update the APT index:
$ sudo apt-get update

# You can install Qv2ray from APT now:
$ sudo apt-get install qv2ray

Screen

可以在多个进程之间多路复用一个物理终端的全屏窗口管理器

1
2
3
4
5
6
7
8
9
10
11
12
# 安装
$ sudo apt-get install screen
# 创建会话
$ screen -S sessionname
# 列出会话
$ screen -ls
# 恢复会话
$ screen -r sessionname or sessionid
# 到另一台机器上回复会话
$ screen -d -r sessionname or sessionid
# 共享会话
$ screen -X

暂离当前会话

1
Ctrl + a then d

子会话

1
2
3
4
5
Ctrl + a then c #在当前screen会话中创建一个子会话
Ctrl + a then w #子会话列表
Ctrl + a then p #上一个子会话
Ctrl + a then n #下一个子会话
Ctrl + a then 0-9 #在第0窗口至第9子会话间切换

读取Mac的文件格式

1
$ sudo apt-get install hfsprogs

IFCONFIG

1
$ sudo apt-get install net-tools

Terminal

推荐两个Terminal,可以替代系统的终端

Guake

通过快捷键可以快速打开和管理,支持Tab

1
2
3
4
# 安装
$ sudo apt-get install guake -y
# 设置为开机启动
$ sudo cp /usr/share/applications/guake.desktop /etc/xdg/autostart/

Terminator

可以分窗口,功能比自带Terminal强太多,难怪安装好就成了默认终端了。。。

安装

1
2
# 安装
$ sudo apt-get install terminator

主题插件

1
2
3
4
5
6
7
8
9
10
11
# 原生Terminator的主题太丑,我喜欢花里胡哨,所以安装themeplugin是必须的
# git有,https://github.com/EliverLara/terminator-themes
# 创建一个配置文件(应该安装好terminator就会有)
$ mkdir -p $HOME/.config/terminator/plugins
# 看下terminator的版本
$ dpkg -l | grep terminator
# 下载plugins,是个python
# 如果 >= 1.9
$ wget https://git.io/v5Zww -O $HOME"/.config/terminator/plugins/terminator-themes.py"
# 如果 < 1.9
$ wget https://git.io/v5Zwz -O $HOME"/.config/terminator/plugins/terminator-themes.py"
  • 打开Terminator,右键打开Preferences,切换到Plugin Tab,勾选TerminatorThemes

  • 在右键下出现Theme菜单,可以切换Theme了,有好多哦!

设置默认主题

  • 在Layout里新建一个布局,选择自己喜欢的主题。
  • 在preferences的global Tab里,勾选Re-use profiles for new terminals

这个做法我没试过,我创建了一个新的布局, 然后再~/.config/terminator/config 文件里,把defalut删了,再把我的布局名称改成了defalut了,还可以设置窗口大小。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[[default]]
[[[child0]]]
type = Window
parent = ""
order = 0
position = 668:271
maximised = False
fullscreen = False
size = 1200, 600
title = yao@Yao-ThinkPad-E460:~/Desktop
last_active_term = f5ab9814-cb1b-49b6-939d-63c9ba290ec1
last_active_window = True
[[[terminal1]]]
type = Terminal
parent = child0
order = 0
profile = Venom
uuid = f5ab9814-cb1b-49b6-939d-63c9ba290ec1

Dropbox

添加源

1
2
3
4
5
6
7
8
9
$ sudo nano /etc/apt/sources.list.d/dropbox.list
## 编辑如下内容:

deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu bionic main

## 添加 apt-key
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1C61A2656FB57B7E4DE0F4C1FC918B335044912E
$ sudo apt update
$ sudo apt install python3-gpg dropbox

第一次启动Dropbox时会下载守护程序,但是在墙外,设置系统代理没有用,需要在启动dropbox命令行前单独设置代理,也可以手动下载

1
2
## 手动下载命令
$ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

启动Dropbox,需要使用https的代理

1
sudo https_proxy=http://ip:port dropbox start -i