1. SSH

  • sudo apt-get install openssh-server 安装 openssh 服务
  • ssh username@host_IP 连接到远程服务器
  • scp local_path/filename username@host_IP:remote_path 复制本地文件到服务器
  • scp username@host_IP:remote_path/filename locallpath 从远程服务器复制文件到本地
  • scp -r locallpath username@host_IP:remote_path 复制本地文件夹到服务器
  • scp -r username@host_IP:remote_path locallpath 从远程服务器复制文件夹到本地
  • scp -r ~/shell/ senius@142.138.0.0:/home/lab611/ 复制本地文件夹到服务器
  • scp -r senius@142.138.0.0:/home/lab611/kernel ~/ 从远程服务器复制文件夹到本地

2. Python

  • sudo apt-get install python3-pip 安装 Python3 对应的 pip3
  • sudo pip3 install tensorflow 安装 tensorflow (CPU 版本)
  • sudo pip3 install tensorflow-gpu 安装 tensorflow (GPU 版本)
  • sudo pip3 install tensorflow-gpu==1.6.0 安装 tensorflow (GPU 特定版本)
  • sudo pip3 uninstall tensorflow 卸载 tensorflow
  • pip3 list 查看安装的所有 Python 库
  • 多个版本的 Python 更换
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 # Python 列表增加 Python 2.7,优先级为 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2 # Python 列表增加 Python 3.5,优先级为 2
update-alternatives --list python # 列出所有的 Python 列表
update-alternatives --config python # 配置默认的 Python 版本
update-alternatives --remove python /usr/bin/python2.7 # Python 列表删除 Python 2.7

获取更多精彩,请关注「seniusen」!