knowledge_map/Linux(Ubuntu个人常用软件安装).md
2021-04-28 15:14:42 +08:00

94 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# LinuxUbuntu个人常用软件安装
#### Qv2ray
* v2ray core
https://github.com/v2fly/v2ray-core/releases/download/v4.34.0/v2ray-linux-64.zip
* 安装qv2ray
打开terminal运行以下命令安装qv2ray
```sh
sudo snap install qv2ray
```
* 配置v2ray core
[下载](https://github.com/v2fly/v2ray-core/releases/download/v4.34.0/v2ray-linux-64.zip)并解压v2ray core 至任意位置但不能和qv2ray执行文件在统一路径下。
双击打开qv2ray 依次点击 首选项,内核设置
#### Ubuntu安装edge
```sh
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm microsoft.gpg
sudo apt update
sudo apt install microsoft-edge-dev
```
#### Ubuntu安装gitlab
```shell
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_13.6.7-ce.0_amd64.deb/download.deb
dpkg -i gitlab-ce_13.6.7-ce.0_amd64.deb
```
#### 盒盖不休眠
```shell
sudo vim /etc/systemd/logind.conf
```
其中的
#HandleLidSwitch=suspend 改成 HandleLidSwitch=ignore
之后重启服务或者执行reboot
```shell
service systemd-logind restart
```
#### 切换cmake版本
```shell
sudo gedit ~/.bashrc
```
在文件的末尾加上
```
export CMAKE_HOME=/home/sdu/sxq/tools/cmake-3.18.4-Linux-x86_64/bin
export PATH=$CMAKE_HOME:$PATH
```
CMAKE_HOME后面的路径为下载解压后的cmake的bin路径
#### 切换GCC版本
安装其他版本的gcc其中7为版本号
```shell
sudo apt-get install -y gcc-7 g++-7
```
查看已安装的版本
```sh
ls /usr/bin/gcc*
```
版本切换
```sh
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 10 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --config gcc
```
输入数字选择版本