admin管理员组文章数量:1530842
0x01 查看显卡
spci | grep -i vga
0x02 查看系统版本
lsb_release -a
cat /proc/version
uname -a
0x03 查看NVIDIA 显卡
nvidia-smi
0x04 查看CUDA版本
nvcc -V
0x05 不断刷新一个命令
watch
0x06 查找一个命令
which
0x07 docker使用
ref:http://blog.csdn/scythe666/article/details/78094848
0x08 全盘搜索
find / -print|grep FILENAME
0x09 打印命令详细信息
ps+pid
0x10 git版本回退
命令git reflog用来记录你的每一次命令:
$ git reflog
ea34578 HEAD@{0}: reset: moving to HEAD^
3628164 HEAD@{1}: commit: append GPL
ea34578 HEAD@{2}: commit: add distributed
cb926e7 HEAD@{3}: commit (initial): wrote a readme file
Git必须知道当前版本是哪个版本,在Git中,用HEAD表示当前版本,也就是最新的提交3628164…882e1e0(注意我的提交ID和你的肯定不一样),上一个版本就是HEAD,上上一个版本就是HEAD,当然往上100个版本写100个比较容易数不过来,所以写成HEAD~100。
回退命令:
$ git reset --hard 3628164
HEAD is now at 3628164 append GPL
0x11 看安装在哪
dpkg -S libcupti
0x12 查看cudnn安装情况和版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
0x13 查看是哪一个人在跑程序
ps u [pid]
0x14 查看anaconda版本号
conda info has this information. If you need to access it programmatically, use conda info --json.
0x15 查看pytorch版本号
import torch
print(torch.__version__)
0x16 查找命令输出
docker images | grep huwang
0x17 tmux 使用
上下分屏:ctrl + b 再按 "
左右分屏:ctrl + b 再按 %
切换屏幕:ctrl + b 再按o
关闭一个终端:ctrl + b 再按x; 或者直接ctrl + d
上下分屏与左右分屏切换: ctrl + b 再按空格键
detach 当前终端,ctrl + b 再按d
新建终端:tmux new -s dev
链接终端:tmux attach -t dev; 只有一个终端时,直接 tmux a
ubuntu如何设置鼠标滚动
按完前缀ctrl+B后,再按冒号:进入命令行模式,
输入以下命令:
set -g mouse on
就启用了鼠标滚轮,可以通过鼠标直接选择不同的窗口,也可以上下直接翻页。
Tip
但在以上设置下,会发现无法用中键向 tmux 中复制文本,也无法将 tmux 中选择好的文本中键复制到系统其他应用程序中。
这里有一个 trick,那就是在 tmux 中不论选择还是复制时,都按住 Shift 键,你会发现熟悉的中键又回来了
版权声明:本文标题:wh常用命令 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1725584858a1031072.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论