配置初始环境(add user)

添加用户

sudo adduser maxwell
sudo usermod -aG sudo username 添加sudo权限

参考链接:https://www.myfreax.com/how-to-add-and-delete-users-on-ubuntu-18-04/

配置ssh免密码登录

本机生成公私密钥对

cd C:\Users\cyx02\.ssh
ssh-keygen -t rsa -P ''

将id_rsa.pub上传至目标服务器~/.ssh/, 若无该目录则创建

scp id_rsa.pub maxwell@XXX.XXX.XXX.XX:/home/maxwell
cat id_rsa.pub >> authorized_keys
cat authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh/

参考链接:https://www.cnblogs.com/likui360/p/6012035.html

安装miniconda

可以不重新安装,复制~/.bashrc中conda的配置即可。也可以自己再装一个,一百多兆。

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
 __conda_setup="$('/home/maxwell/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
 if [ $? -eq 0 ]; then
     eval "$__conda_setup"
 else
     if [ -f "/home/maxwell/miniconda3/etc/profile.d/conda.sh" ]; then
         . "/home/maxwell/miniconda3/etc/profile.d/conda.sh"
     else
         export PATH="/home/maxwell/miniconda3/bin:$PATH"
     fi
 fi
 unset __conda_setup
 # <<< conda initialize <<<

配置CUDA

若不重新安装CUDA,则直接在bashrc后面添加两行,链接上去就好了

vim ~/.bashrc

添加如下两行

#cuda 11.1
export PATH="/usr/local/cuda-11/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11/lib64/:$LD_LIBRARY_PATH"

conda 添加及删除环境

conda create -n LiCode python=3.8.5
conda remove -n LiCode

vim显示行号

sudo vim /etc/vim/vimrc
posted @ 2021-11-11 20:53  Maxwell'Maxwill  阅读(94)  评论(0编辑  收藏  举报