-
Ubuntu清理缓存
①. 清理APT缓存sudo du -sh /var/cache/apt/archives //查看 sudo apt-get clean //删除
②. 删除旧内核
sudo apt-get autoremove --purge
③. 应用商城下载 BleachBit
④. 清除缩略图缓存
du -sh ~/.cache/thumbnails/ //查看 rm -rf ~/.cache/thumbnails/* //删除
⑤. 清理日志
journalctl --disk -usage // 查找 sudo journalctl --vacuum-time=3d // 删除
-
ubuntu美化
//打开优化界面 gnome-tweaks //安装插件 sudo apt-get install gnome-shell-extension-autohidetopbar //卸载插件 sudo apt-get remove gnome-shell-extension-autohidetopbar gedit ~/.bashrc
-
切换cuda软连接
//删除之前生成的软链接 sudo rm -rf /usr/local/cuda //生成新的软链接 sudo ln -s /usr/local/cuda-10.1 /usr/local/cuda cat /usr/local/cuda/version.txt
-
显卡显存问题
import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ['CUDA_VISIBLE_DEVICES'] = "0,1" #选择哪一块gpu,如果是-1,就是调用cpu config = tf.ConfigProto()//对session进行参数配置 config.allow_soft_placement=True # 如果你指定的设备不存在,允许TF自动分配设备 config.gpu_options.per_process_gpu_memory_fraction=0.7 #分配百分之七十的显存给程序使用,避免内存溢出,可以自己调整 config.gpu_options.allow_growth = True #按需分配显存,这个比较重要 session = tf.Session(config=config) ##或者 with tf.Session(config=config) as sess:
-
查看线程和GPU
htop watch -n 0.1 -d nvidia-smi
-
版本对应
tensorflow=2.1.0 cuda=10.1 cudnn=7.6 Keras=2.2.4 pip install tensorflow-gpu==2.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
-
查看电脑里已经安装的cuda版本
ls -l /usr/local | grep cuda
-
清除历史命令记录
rm -rf ~/.bash_history history -c
-
查看Ubuntu安装的虚拟环境
conda info --envs
-
Ubuntu安装的分区选择
/boot 主分区 500M 空间起始位置 / 逻辑分区 40G 空间起始位置 /home 逻辑分区 64G 空间起始位置 swap 交换分区 32G 空间起始位置
-
Pycharm中无法输入英文,会有带下划线的汉字出现
#-------------------------------------------- 我在一篇已经被删除的提问里找到了... IntelliJ IDEA无法输入中文 ubuntu 20.04 Intelligent Pinyin 1.11.1 IntelliJ IDEA 2020.2.2(Ultimate Edition) 当全拼输入 2~3个汉字时,会被强行打断,然后就无法继续输入(也无法切换中英文),并且汉字下会有下划线。 该提问来源于开源项目:libpinyin/ibus-libpinyin 1.点击菜单 "Help | Edit Custom VM options..." 2.添加 -Drecreate.x11.input.method=true 到最后一行 3.重启IDEA
-
通过df -h 查看占用已满,实际上并没有满的情况
cd ~ cd .local/share/Trash du -h sudo rm -rf *
-
跑通ConvertRGBD.m的秘诀
1.Ubuntu 2.gcc-6.3.0 sudo update-alternatives --config gcc 3.sudo apt-get update sudo apt-get install libann0 4.在原始code的基础上,使用蒋小朵的intrinsic_texture文件夹,nyu_utils绝对不能动,因为其中有一个关于ConvertRGBDParsave.m的文件夹,可能还需要从蒋小朵那边更换 mex_cbf文件
-
清除缓存
sudo sh -c "echo 1 > /proc/sys/vm/drop_caches" sudo sh -c "echo 2 > /proc/sys/vm/drop_caches" sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
Ubuntu释放磁盘空间指令
于 2023-09-13 23:57:32 首次发布