新服务器配置

  1. 查看自己发行版与版本 lsb_release -a

    Linux 内核版本 版本号码 稳定版本:2.4.32 开发版本:2.5.19-6 主版本号.稳定(稳定)/开发版本(奇).发布号-patch 号

  2. 修改密码 sudo passwd user(user 是对应的用户名)

  3. 换源 注意:在下拉菜单选择对应的 Ubuntu 版本 ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

  4. 更新系统

    1
    2
    sudo apt-get update
    sudo apt-get upgrade

  5. 安装 git wget curl tmux

    1
    sudo apt-get install vim git wget curl tmux zip

  6. 改 host 便于上 github

    使用 ipaddress.com 这个网站查找相应域名的 IP 地址,修改 HOST 文件 sudo vim /etc/hosts

    1
    2
    3
    199.232.69.194 https://github.global.ssl.fastly.net
    140.82.114.4 github.com
    140.82.114.4 gist.github.com

  7. 配置 git 连接 github

  1. 如果虚拟机需要安装 vmtool
注意:先安装好Ubuntu虚拟机,再安装 vmtool,ubuntu 安装过程中会对 iso CD-ROM 进行锁定
[2020最新版VMware安装Ubuntu20.04教程(巨细)! - 知乎](https://zhuanlan.zhihu.com/p/141033713)

常用工具

安装 python3, python3-pip

1
sudo apt install python3.9 python3-pip

安装 zsh 和 oh-my-zsh

安装 zsh: sudo apt install zsh 下载 oh-my-zsh:sh -c "$(curl --insecure -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

修改主题,增加插件

1
2
3
vim ~/.zshrc
# 修改 ZSH_THEME="robbyrussell" 为 ZSH_THEME="ys"
source ~/.zshrc

安装插件 zsh-suggestions, zsh-syntax-highlighting

1
2
3
4
5
6
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# 修改 ~/.zshrc:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
source ~/.zshrc

安装

sudo apt-get install inetutils-ping net-tools 上述命令是安装 ping and ifconfig 工具

安装开发环境

Install nvidia-cuda-toolkit Using apt

sudo apt update:Update apt database with apt using the following command.

After updating apt database, We can install nvidia-cuda-toolkit using apt by running the following command:

sudo apt -y install nvidia-cuda-toolkit

显卡常规测试

systemd-detect-virt -c

如果输出为 none,则说明是物理机。

显卡常规检测 GPUBURN gpu-burn 测试显卡步骤

install miniconda

1
2
3
4
5
6
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
# 之后认真看每一步骤和后面输出的,会教你如何在shell中激活conda
export PATH=/home/your_user_name/miniconda/bin:$PATH #临时激活
conda config --set auto_activate_base false
conda init zsh # 将激活写入shell的配置文件
To initialize your shell, run `conda init <SHELL_NAME>` Currently supported shells are: - bash - fish - tcsh - xonsh - zsh - powershell

参考资料

Installing on Linux — conda 4.13.0.post1+0adcd595 documentation An introduction to Conda