ubuntu 20.1 (linux) 下软件安装教程(基本上都是使用命令行安装)

一、node

1. 安装教程

1
2
3
4
5
6
7
8
9
10
11
#  第二步,添加源后安装 需要什么版本直接替换后面的数字即可,如果需要21,直接将20替换为21就可以了
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# 开始进行安装
sudo apt install -y nodejs
# https://learnku.com/articles/42581


# 直接 apt 安装
apt install nodejs


2. 包管理

  1. n
1
2
3
4
5
npm install -g n # 安装n

# https://segmentfault.com/a/1190000016956077
# https://juejin.cn/post/7065534944101007391

  1. nvm 使用教程
    https://www.freecodecamp.org/chinese/news/how-to-install-node-js-on-ubuntu-and-update-npm-to-the-latest-version

3. 镜像源修改

将其修改为淘宝的镜像源

1
2
3
4
5
# 永久更换
npm config set registry https://registry.npm.taobao.org

# 查看镜像源
npm config get registry

除了更换 npm 默认镜像源的方式,还可以使用 cnpm 来代替 npm,间接实现提高下载速度。cnpm 的安装和使用方式如下:

1
2
3
4
5
# 安装
npm install -g cnpm --registry=https://registry.npm.taobao.org
#查询版本
cpnm -v

用 cnpm 替代 npm

1
2
#使用cpnm命令替代npm命令
cnpm install

二、 java 安装

1.jdk

https://developer.aliyun.com/article/704959

2.maven 配置环境变量

https://blog.csdn.net/idomyway/article/details/81974677

三、git 使用教程

1. 安装

1
2
3
    sudo apt install git-all
#https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git

2. 使用方法

  1. 生成密钥
1
2
ssh-keygen -t ed25519 -C "*******************************************"
#(https://docs.github.com/zh/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

3. 添加提交默认配置

安装完成之后第一次配置:

1
2
3
4
git config --global user.email  "*******************************************"  # 设置全局用户邮箱(为了防止隐私泄露,使用隐私邮箱)
git config --global user.name "Alex" # 设置全局用户名
git config --global init.defaultBranch main # 设置默认分支为main分支

4.git 为每个项目单独设置用户名和邮箱

(如果使用令牌登录,那么就不在需要设置 git 提交信息了)

方法一 :

github 配置
1
2
3
4
5
6
git config --local user.name "Alex"
git config --local user.email "*******************************************"
#github 邮箱必须是这个,不然github显示用户名会有问题会影响统计,如果是码云也是一样的,需要邮箱与你绑定的一致

# 查看配置是否设置成功
git config --local -l
gitee 码云配置
1
2
3
4
5
6
git config --local user.name "JadePanda"
git config --local user.email *******************************************
#gitee 邮箱必须是这个,不然github显示用户名会有问题会影响统计,如果是码云也是一样的,需要邮箱与你绑定的一致

# 查看配置
git config --local -l

方法二:
直接在.git/config 配置文件中设置

1
2
3
[user]
name = xxx
email = xxx

5.Git 配置不同项目的不同账号

https://blog.csdn.net/u011291072/article/details/110958093

https://tutorials.tinkink.net/zh-hans/git/git-using-different-config-in-different-projects.html#区分公钥-私钥

6. 关于隐私邮箱:

  1. github 是:*******************************************
  2. gitee 是 *******************************************
    设置的时候需要注意一下

四、utools 安装方法

https://mdnice.com/writing/8eb9383bf8404cbeaf0dd140933b54cc

五、python jdk 安装

https://linux.cn/article-15230-1.html

注意:
这里安装 python 最新版本的时候不要卸载原来的 python3.8,否则会造成 ubuntu-desktop 崩溃,从而不能进去 ubuntu 图形界面,解决方法如下:
https://blog.csdn.net/chehec2010/article/details/122632524

六、idea (linux 版本)输入法无法跟随光标解决

https://blog.csdn.net/nan123456789/article/details/129579124

七、postman 如何设置图标

https://blog.csdn.net/cx_sam/article/details/126223231

八、安装微信

一、docker-wechat (目前可用,微信版本 3.3.0)

  1. github: https://github.com/huan/docker-wechat
  2. 具体步骤
    • docker 拉取镜像
    1
    docker pull zixia/wechat
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    docker run \
    --name wechat \
    --rm \
    -i \
    \
    -v "$HOME/wechat/WeChatFiles/":'/home/user/WeChatFiles/' \
    -v "$HOME/wechat/ApplcationData":'/home/user/.wine/drive_c/users/user/ApplicationData/' \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    \
    -e DISPLAY \
    \
    -e XMODIFIERS=@im=fcitx \
    -e GTK_IM_MODULE=fcitx \
    -e QT_IM_MODULE=fcitx \
    -e GID="$(id -g)" \
    -e UID="$(id -u)" \
    \
    --ipc=host \
    --privileged \
    \
    zixia/wechat

二、docker-wechat (目前最火,版本最新,目前最新是 3.9.0) 目前存在的问题是,无法使用搜狗输入法

  1. 仓库地址:https://github.com/top-bettercode/docker-wechat
  2. 具体命令
    • 拉取镜像
    1
    docker pull bestwu/wechat
    • 启动服务
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    docker run -d --name wechat --device /dev/snd --ipc="host"\
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $HOME/WeChatFiles:/WeChatFiles \
    -e DISPLAY=$DISPLAY \
    -e XMODIFIERS=@im=fcitx \
    -e GTK_IM_MODULE=fcitx \
    -e GTK_IM_MODULE=fcitx \
    -e AUDIO_GID=`getent group audio | cut -d: -f3` \
    -e GID=`id -g` \
    -e UID=`id -u` \
    bestwu/wechat
  3. 教程地址:https://ugirc.blog.csdn.net/article/details/109487664

九、docker 安装

1. 安装

1
apt install docker.io