The difference between memory and hard disk
1. The memory is made of semiconductor materials, and the hard disk is made of magnetic materials.
2. The information in the memory will disappear when the power is off, and the information in the hard disk can be stored for a long time.
3. The execution program is first put into the memory, and then put into the CPU for processing.
Primary storage is like RAM, secondary storage is like hard disk
Ubuntu view system memory
free -m (以MB形式显示)
free -g (以GB形式显示)
As shown below
Total = Used + Free + Cache; Available = Free + Cache
If the cache is relatively large , don’t worry that the system will handle it automatically. Manual processing can restart sudo reboot.
View system hard disk
lsblk -f (查看系统的分区和挂载情况)
df -h (查看整体体磁盘使用情况)
As shown in the figure below, take the red part below as an example, we only need to know the size of our root directory and the used memory.
Specify directory usage
du -h --max-depth=0 (查看当前目录使用情况,depth表示目录的深度)
du -h /目录 --max-depth=0 (查看指定目录使用情况,depth表示目录的深度)
查看指定目录的磁盘占用情况,默认是当前目录
- s:指定目录占用大小汇总
- h:带计量单位
- a:含文件
--max-depth=1 :子目录深度
- c:列出明细的同时,增加汇总值。
As shown below
GPU graphics card
sudo nvidia-smi
I see here that the 0th GPU is GeForce RTX 3080 Memory10024 (5MiB/10018MiB)