【一些神操作】

git 设置全局用户名密码

git config --global user.name "your name"
git config --global user.email "your@mail.sdu.edu.cn"

git 解决每次pull push 都输入用户名密码

git config --global credential.helper store

git 默认编辑器模式为vim

git config --global core.editor vim

git 修改终端指令显示英文

   git config --global i18n.commitencoding utf-8    # 设置提交信息编码为 UTF-8
   git config --global i18n.logoutputencoding utf-8    # 设置日志输出编码为 UTF-8
   git config --global i18n.logoutputencoding utf-8    # 设置日志输出编码为 UTF-8
   git config --global i18n.commitencoding utf-8    # 设置提交信息编码为 UTF-8
   git config --global i18n.logoutputencoding utf-8    # 设置日志输出编码为 UTF-8
   git config --global gui.encoding utf-8    # 设置图形界面编码为 UTF-8

bash 显示git 当前分支

编辑~/.bashrc 文件, 追加内容如下

function git_branch {
    branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
    if [ "${branch}" != "" ];then
        if [ "${branch}" = "(no branch)" ];then
            branch="(`git rev-parse --short HEAD`...)"
        fi
        echo " ($branch)"
    fi
}
export PS1='\[\e[32;40m\]\u@\h: \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ '

最后执行 source ~/.bashrc

git 把一个初始化gitlab 迁移到github并上传

cd /path/to/your/local/repo
# 如果之前初始化过这个项目先执行下面的指令。否则,忽略这条
sudo rm -r .git
# 执行下面指令
git init
git remote add origin https://github.com/username/repository.git
git add .
git commit -m "Initial commit"
git push -u origin master -f

miniconda python 环境不生效

安裝cuda 关闭代理

wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run
sudo sh cuda_12.1.1_530.30.02_linux.run

编辑 sudo vim ~/.bashrc

export PATH=$PATH:/usr/local/cuda/bin  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64  
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/lib64


安裝cudnn 关闭代理

最新版本

wget https://developer.download.nvidia.com/compute/cudnn/9.2.0/local_installers/cudnn-local-repo-ubuntu2204-9.2.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.2.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.2.0/cudnn-*-keyring.gpg /usr/share/keyrings/

旧版本: 旧版本下载

最后执行下面指令


sudo apt update
sudo apt install libcudnn8
sudo apt install libcudnn8-dev
sudo apt install libcudnn8-samples

cudnn 版本错了,

 sudo dpkg -l |grep cudnn
 sudo apt-get purge cudnn9-cuda-12-5 # 删除不要的

wsl 使用

# 看下有哪些系统
wsl -l -v
# 先停止
wsl --terminate Ubuntu-22.04
# 备份 导出
wsl --export Ubuntu-22.04 D:\wslubuntu\ubuntu2204.tar
# 导入
wsl --import Ubuntu-22.04 C:\WSL D:\temp\Ubuntu-22.04.tar


wsl 慎用这个指令!!!这个会直接把虚拟盘数据全部删除且不可恢复

wsl --unregister Ubuntu-22.04

cudnn so 文件找不到,执行下面指令生效

 ldconfig -p | grep cud #查看lib依赖
 export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH

change pip yuan

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# file path: /home/shiyou/.config/pip/pip.conf

装了一个钉钉,因为换了系统

在这里插入图片描述

ssh 免密登录

ssh-keygen -t rsa 
1ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip

待补充

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值