ubuntu 20.04LTS 桌面版本日常使用配置

满足日常开发或办公

SSH

心跳

# .ssh/config
Host *
  Protocol 2
  ServerAliveInterval 30

Tunnel Proxy

# .ssh/config
Host web_gateway
        HostName 192.168.0.2
        User root
        Port 22
#       IdentityFile ~/.ssh/id_rsa

Host web_service
        User root
        ProxyCommand ssh -xaqW 192.168.0.3:22 web_gateway

Docker

安装

不推荐采用 snap 安装

sudo apt install -y docker.io

配置免sudo

docker守护进程启动的时候,会默认赋予名字为docker的用户组读写Unix socket的权限,因此只要创建docker用户组,并将当前用户加入到docker用户组中,那么当前用户就有权限访问Unix socket了,进而也就可以执行docker相关命令

方法1

sudo usermod -aG docker $USER #将登录用户加入到docker用户组中
sudo systemctl restart docker #重启docker,
# 还需要密码,请尝试重启机器

方法2

sudo gpasswd -a $USER docker #将登录用户加入到docker用户组中
newgrp docker#更新用户组
docker ps #测试docker命令是否可以使用sudo正常使用

镜像加速器

阿里云教程

增强命令

tags 查找所有 images 标签, ctop 查看 运行状态

可放入系统 .zshrc 等用户启动环境里

# docker tags
docker () {
  if [[ "${1}" = "tags" ]]; then
    docker_tag_search $2
  elif  [[ "${1}" = "ctop" ]]; then
    command docker run --rm -ti --name=ctop --volume /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop:latest
  else
    command docker $@
  fi
}

docker_tag_search () {
  # Display help
  if [[ "${1}" == "" ]]; then
    echo "Usage: docker tags repo/image"
    echo "       docker tags image"
    return
  fi

  # Full repo/image was supplied
  if [[ $1 == *"/"* ]]; then
    name=$1

  # Only image was supplied, default to library/image
  else
    name=library/${1}
  fi
  printf "Searching tags for ${name}\n"

  #curl -L -s "https://registry.hub.docker.com/v2/repositories/${name}/tags?page_size=1024"|docker run -i stedolan/jq   -r '."results"[]["name"]'
  wget -q https://registry.hub.docker.com/v1/repositories/${name}/tags -O -  | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n'  | awk -F: '{print $3}'

Node

多版本

NVM

Python Java 等 多版本

通过update-alternatives 命令实现

微信和QQ

安装教程

采用 docker 安装

GitHub项目

企业微信

DockerHub项目

# 自定义docker参数
docker run \
  --name DoWork \
  run -d \
  -v "$HOME/DoWork/WXWork/":'/home/user/WXWork/' \
  -v "$HOME/DoWork/Applcation Data":'/home/user/.wine/drive_c/users/user/Application Data/' \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v $HOME:$HOME \
  \
  -e DISPLAY=unix$DISPLAY \
  -e XMODIFIERS=@im=ibus \
  -e QT_IM_MODULE=ibus \
  -e GTK_IM_MODULE=ibus \
  -e AUDIO_GID=`getent group audio | cut -d: -f3` \
  -e VIDEO_GID=`getent group video | cut -d: -f3` \
  -e GID="$(id -g)" \
  -e UID="$(id -u)" \
  \
  --ipc=host \
  --privileged \
  \
  zixia/wxwork


docker run -d --name wxWork --device /dev/snd \                                                                                                                                           craone@craone-ubuntu
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $HOME/WXWork:/WXWork \
    -v $HOME:$HOME \
    -v $HOME/wine-WXWork:/home/wechat/.deepinwine/Deepin-WXWork \
    -e DISPLAY=unix$DISPLAY \
    -e XMODIFIERS=@im=ibus \
    -e QT_IM_MODULE=ibus \
    -e GTK_IM_MODULE=ibus \
    -e AUDIO_GID=`getent group audio | cut -d: -f3` \
    -e GID=`id -g` \
    -e UID=`id -u` \
    -e DPI=96 \
    -e WAIT_FOR_SLEEP=1 \
    boringcat/wechat:work

Git Flow

apt install git-flow

Archive Manager

支持 RAR

apt install unrar

Zip 乱码

# -O 参数 CP936 或 GBK 或 GB18030
unzip -O CP936 xxx.zip

修复

NTFS 只读修复

# 因 linux ntfs 是逆向研发 很久没 更新 维护, 而 microsoft 一直在更新,所以会出现这种情况,期待 内核 集成 Paragon Software
sudo ntfsfix /dev/sdb3

纯命令终端 中文字 方块

CTRL+ALT+F3 终端

#LANG=en_US.UTF-8
#LANGUAGE="en_US.UTF-8:zh_CN.UTF-8"
#LC_ALL="en_US.UTF-8:zh_CN.UTF-8"
sudo vi /etc/default/locale # 修改  LANG 和 LANGUAGE 为上面值
sudo source /etc/default/locale

输入法

安装 Rime(中州韻) 五笔拼音

显示图标

安装

  1. 浏览器安装插件
  2. 打开地址:Gnome扩展商店
  3. 搜索框输入:TopIcons Plus
  4. 打开列表页面选择开启

钉钉

安装

Electron钉钉官网

官方版本 (ibus 输入法 聊天框无法输入 中字)

Oh My Zsh

增强 terminal

安装

Oh My Zsh官网

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

推荐配置

# .zshrc 文件
plugins=(
  git
  ubuntu
  # esc esc 激活
  thefuck
  docker
  z
)

# 推荐主题
ZSH_THEME="af-magic"

# alias vi="vim"
alias vi="vim-editor"

Easy Connect

docker run --device /dev/net/tun --cap-add NET_ADMIN -ti -e PASSWORD=*** -v $HOME/.docker/data/easy_connect:/root -p 127.0.0.1:5901:5901 -p 127.0.0.1:1080:1080 hagb/docker-easyconnect:7.6.3
xhost +LOCAL:
docker run --device /dev/net/tun --cap-add NET_ADMIN -ti -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.docker/data/easy_connect:/root -e EXIT=1 -e DISPLAY=$DISPLAY -e URLWIN=1 -e TYPE=x11 -p 127.0.0.1:1081:1080 hagb/docker-easyconnect
xhost -LOCAL:

Screenshot OCR 屏幕OCR

add-apt-repository ppa:daniel.p/dpscreenocr
apt-get update
apt  install dpscreenocr
# Installing languages https://help.ubuntu.com/community/OCR#Tesseract
apt install  tesseract-ocr-eng tesseract-ocr-chi-sim tesseract-ocr-chi-sim-vert tesseract-ocr-chi-tra tesseract-ocr-chi-tra-vert

Too Long, Don't Read tldr 中文意思:太长不看的意思。

man命令代替命令

npm install -g tldr
tldr --update
#or
snap install tldr-luk3yx

Firefox

HTML5 Player 播放器

  1. 卸载 安装 snap 版本 snap install firefox (推荐)
  2. 安装插件 sudo apt install ubuntu-restricted-extras

其它程序列表

代理工具

apt install proxychains

Name                               Version                         Rev    Tracking          Publisher         Notes
# x86 安卓虚拟机
anbox                              4-56c25f1                   186    latest/beta       morphis           devmode
android-studio                     2021.1.1.21                 119    latest/stable     snapcrafters      classic
bare                               1.0                         5      latest/stable     canonical✓        base
brave                              1.36.112                    148    latest/stable     brave             -
canonical-livepatch                10.1.4                      132    latest/stable     canonical✓        -
chromium                           99.0.4844.51                1926   latest/stable     canonical✓        -
code                               c722ca6c                    91     latest/stable     vscode✓           classic
core                               16-2.54.3                   12725  latest/stable     canonical✓        core
core18                             20211215                    2284   latest/stable     canonical✓        base
core20                             20220304                    1376   latest/stable     canonical✓        base
csbooks                            6.1.0                       47     latest/stable     caesiumstudio     -
# 没有ssh-key interface 需要自已设置读权限 参考 debug snap
dbeaver-ce                         22.0.0.202203060510         160    latest/stable     dbeaver-corp      -
discord                            0.0.17                      132    latest/stable     snapcrafters      -
docfetcher                         1.1.25-snap1                4      latest/stable     vasilisc          -
electronic-wechat                  2.0                         7      latest/stable     ubuntu-dawndiy    -
ffmpeg                             4.3.1                       1286   latest/stable     snapcrafters      -
filezilla                          3.41.2+pkg-d9eb                 17     latest/beta       brlin             -
firefox                            98.0.1-2                    1115   latest/stable     mozilla✓          -
flameshot                          v11.0.0+git0.ad1bf28        180    latest/stable     borgman-jeremy    -
gimp                               2.10.28                     383    latest/stable     snapcrafters      -
gnome-3-28-1804                    3.28.0-19-g98f9e67.98f9e67  161    latest/stable     canonical✓        -
gnome-3-34-1804                    0+git.3556cb3               77     latest/stable     canonical✓        -
gnome-3-38-2004                    0+git.1f9014a               99     latest/stable     canonical✓        -
goldendictionary                   0.1                         1      latest/stable     xiaoguo           -
gtk-common-themes                  0.1-59-g7bca6ae             1519   latest/stable/…   canonical✓        -
gtk2-common-themes                 0.1                         13     latest/stable     canonical✓        -
handbrake-jz                       1.2.2                           142    latest/stable     jz                -
heroku                             v7.59.4                     4085   latest/stable     heroku✓           classic
influx                             2.0.0-beta.16               4      latest/beta       influxdata✓       -
intellij-idea-ultimate             2021.3.2                    341    latest/stable     jetbrains✓        classic
java-jre-ondra                     1.8.0-322                   85     latest/edge       ondra             -
jq                                 1.5+dfsg-1                  6      latest/stable     mvo               -
kate                               21.12.1                     126    latest/stable     kde✓              classic
kde-frameworks-5                   5.47.0                      27     latest/stable     kde✓              -
kde-frameworks-5-core18            5.61.0                      32     latest/stable     kde✓              -
kde-frameworks-5-qt-5-14-core18    5.68.0                      4      latest/stable     kde✓              -
kde-frameworks-5-qt-5-15-3-core20  5.87.0                      8      latest/stable     kde✓              -
kde-frameworks-5-qt-5-15-core20    5.79.0                      14     latest/stable     kde✓              -
kdenlive                           21.12.2                     48     latest/stable     kde✓              -
ktorrent                           21.04.0                     13     latest/beta       kde✓              -
kubectl                            1.23.4                      2341   latest/stable     canonical✓        classic
motrix                             1.6.11                      18     latest/stable     agalwood          -
mysql-workbench-community          8.0.25                      9      latest/candidate  tonybolzan        -
netease-music                      0.1                         2      latest/beta       xiaoguo           devmode
nmap                               7.92                        2536   latest/stable     maxiberta         -
node                               16.14.0                     5953   16/stable         iojs✓             classic
notepad-plus-plus                  8.3.3                       356    latest/stable     mmtrt             -
notepadqq                          1.4.8                       855    latest/stable     danieleds         -
postman                            7.36.5                      133    latest/stable     postman-inc✓      -
qv2ray                             2.6.3.5841                  4576   latest/stable     ymshenyu          -
rapidsvn-snap                      0.12.1dfsg-3.1              2      latest/stable     kokoye2007        -
redis-desktop-manager              2022.0.2+f79a564f           599    latest/stable     uglide            -
remmina                            v1.4.25                     5237   latest/stable     remmina✓          -
robo3t-snap                        v1.4.4                      9      latest/stable     shalev67          -
shutter                            0.94.3                      27     latest/stable     popey             -
skype                              8.81.0.268                  203    latest/stable     skype✓            -
snap-store                         3.38.0-66-gbd5b8f7          558    latest/stable     canonical✓        -
snapd                              2.54.3                      14978  latest/stable     canonical✓        snapd
space                              2022.1.1                    30     latest/stable     jetbrains✓        -
speedy-duplicate-finder            1.2.2                       30     latest/stable     qiplex✓           -
ss-qt                              0.1                         4      latest/stable     xiaoguo           -
tacentview                         1.0.25                      22     latest/stable     tangentspace      -
telegram-desktop                   3.4.3                       3544   latest/stable     telegram.desktop  -
# 需要按官方教程在添加 .bashrc 添加命令。感觉功能受到一定限制,用起来givn不是特别好
thefuck                            3.30                        303    latest/beta       mati865           classic
tldr-luk3yx                        1.2                         39     latest/stable     luk3yx            -
typora                             1.1.5                       57     latest/stable     typora            -
uget                               git                         1      latest/edge       michaeltunnell    -
v2ray                              2.37                        2      latest/stable     ubuntu-dawndiy    -
v2ray-core                         3.50                        557    latest/stable     v2ray             -
vidcutter                          6.0.5.1                     62     latest/stable     ozmartian         -
# 用 devmode 解除 AppArmor 路路径访问限制
vim-editor                         8.2.788                     1      latest/beta       zilongzhaobur     devmode
vlc                                3.0.16                      2344   latest/stable     videolan✓         -
# 无法使用
webdingding                        0.1                             1      latest/stable     liamz             -
wine-platform-5-stable             5.0.3                       18     latest/stable     mmtrt             -
wine-platform-6-stable             6.0.2                       14     latest/stable     mmtrt             -
wine-platform-runtime              v1.0                        289    latest/stable     mmtrt             -
# 版本太旧需要安装wps字体,启动后会有提示 推荐官方的 deb 版本
wps-office                         10.1.0.6757                 1      latest/stable     liuyang8          -
xmind                              12.0.0                      12     latest/stable     xmindltd          -
zerotier                           1.8.4                       174    latest/stable     zerotier          -

snap 使用教程

snap 官方文档
Debugging snaps

你可能感兴趣的:(ubuntu 20.04LTS 桌面版本日常使用配置)