随笔分类 - Linux
摘要:把服务器A的文件传给服务器B: 在服务器A上执行: rsync -avz --progress --stats -e ssh 服务器A上文件夹 服务器B用户名@服务器B的IP:服务器B上保存的地址(确保服务器B上保存的地址存在)
阅读全文
摘要:如果直接安装不行:sudo apt-get install sshfs -y,在尝试使用手动安装 0. 参考网站:https://github.com/libfuse/sshfs 1. 下载sshfs源码:https://github.com/libfuse/sshfs/releases 2. 解压
阅读全文
摘要:rm /var/lib/rpm/__db* rm /var/lib/rpm/.rpm.lock rm /var/lib/rpm/.dbenv.lock
阅读全文
摘要:sudo mv /var/lib/rpm/__db* /tmp; sudo rpm --rebuilddb; sudo yum clean all
阅读全文
摘要:vim /etc/profile 然后添加一下代码: RED='\033[0;31m' NONE='\033[0m' # reset colour attribues printf "${RED}This is in red ${NONE}\n"
阅读全文
摘要:sudo lshw -C display
阅读全文
摘要:kill -9 $(ps ax | grep gunicorn | awk '{print $1}')
阅读全文
摘要:sudo yum install -y centos-release-scl sudo yum install -y devtoolset-7 如果使用zsh: scl enable devtoolset-7 zsh 如果使用bash: scl enable devtoolset-7 bash
阅读全文
摘要:1. 命令行传参, 条件语句 if [[ $1 = "happy" ]]; then echo "I'm happy" else echo "I'm not happy" fi 效果:
阅读全文
摘要:1. 更换163源 https://mirrors.163.com/.help/centos.html 2. 更换中科大源 https://mirrors.ustc.edu.cn/help/centos.html 3. 更换清华源 https://mirrors.tuna.tsinghua.edu.
阅读全文
摘要:参考: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
阅读全文
摘要:1. 下载cudnn: https://developer.nvidia.com/rdp/cudnn-download 2. 安装cudnn: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installcud
阅读全文
摘要:查看Red Hat: cat /proc/version 查看CentOS: cat /etc/redhat-release
阅读全文
摘要:修改vim /etc/apt/sources.list文件: 中科大源: deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.ustc.edu.cn
阅读全文
摘要:sudo vim /etc/vim/vimrc 在文件尾部,新建一行,输入:set nu
阅读全文
摘要:1. 服务器上执行whereis sftp-server,找到sftp-server位置 2. 服务器上打开sshd_config: sudo vi /etc/ssh/sshd_config 把Subsystem这行替换成 Subsystem sftp 找到的sftp-server位置 3. 服务器
阅读全文
摘要:现在mujoco的安装变得非常简单: pip install mujoco 即可! 下面是过去安装mujoco的方式: 1. 下载MuJoCo可执行文件:Linux: https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz Mac: htt
阅读全文
摘要:systemctl stop firewalld
阅读全文
摘要:比如有程序占用5500端口,相应的命令为: sudo kill -9 $(sudo lsof -t -i:5500)
阅读全文