解决pip安装进度很慢
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=100 sklearn
创建文件
touch 不能创建文件夹
cp -i(交互,覆盖提醒) file1 file1copy
cp -R(recruit,递归cp) folder1/ folder2/
cp file1 file2 folder1/
mv file1 file1rename
rm -r folder1 删除有文件的文件夹
文件内容修改
nano 修改文件 编辑器
^(表示ctl)
cat 显示文件内容
cat 1.py > 2.py 复制内容
cat 1.py 2.py > 3.py 合并
cat file1 >> file2 将file1的内容添加到file2的内容后面
权限管理
类型 user group others
x 执行文件
chmod(change mode)
chmod u+r(g+r, u-r, u+x, u-w, a-r, ug+r) 1.py
(u user, g group, o others)
首行添加 #!/home/promise/anaconda3/bin/python3.7可以实现 ./1.py 运行python代码
SSH 为 Secure Shell
ssh promise@ip
VNC 局域网图像化连接
ssh name@ip python < 1.py 可以实现在服务器运行文件
scp {a,b}.py name@ip dir 复制本地文件到服务器指定位置
ssh name@ip “python dir/1.py”
ssh name@ip "export DISPLAY=:0; firefox"在远程服务器打开窗口