- curl:发出网络请求,然后得到和提取数据,显示在"标准输出"(stdout)上面。
常用命令
- 查看磁盘剩余空间:
df -h - 查看文件修改时间:
stat <filename> - 查看硬盘:
lsblk - 挂载磁盘:
mount /dev/sdb1 /mnt - 卸载磁盘:
umount /mnt - 查看显卡信息:
nvidia-smi - 查看内存信息:
free -h - 查看进程:
ps aux | grep <name> - 杀掉进程:
kill -9 <pid> - 查看端口占用:
lsof -i:<port> - 关机:
shutdown -h now - 使用部分显卡:
CUDA_VISIBLE_DEVICES=0 python3 train.py - 拷贝服务器文件:
scp -r <username>@<ip>:<path> <local_path>
技巧
- 修改 UbuntuDSN
- 编辑配置:
sudo vim /etc/resolv.conf - 重启服务:
sudo systemctl restart systemd-resolved