我发现Linux和GNU相关的开源代码,常常有很详细的用户手册,开源者希望用这种方式来帮助指导初学者。往往开源运动的软件,大家都是自学,往往没有老师,也没有什么书籍指导。
当我在遇到问题,一般是三板斧,百度搜,B站找,AI问。
找到答案后,往往是几个命令指导,这时,如果能够把这些解决问题的命令,在相关软件的手册中查找,看看手册页是如何解读它的用法及说明的。
这样往往可以更系统的了解软件的相关特性。
举例,我在使用VirtualBox时,发现显卡的现存被限制在128M,导致有点卡,网上一搜,发现一个解决方法:
VBoxManage modifyvm VIRTUAL NAME --vram 256
在找到我使用的VB版本对应的用户手册:
https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifynvram
看到了对这个命令的详细描述:
VBoxManage modifyvm < uuid | vmname > [–name=name] [–groups= group [,group…] ] [–description=description] [–os-type=OS-type] [–icon-file=filename] [–memory=size-in-MB] [–page-fusion= on | off ] [–vram=size-in-MB] [–acpi= on | off ] [–ioapic= on | off ] [–hardware-uuid=UUID] [–cpus=CPU-count] [–cpu-hotplug= on | off ] [–plug-cpu=CPU-ID] [–unplug-cpu=CPU-ID] [–cpu-execution-cap=number] [–pae= on | off ] [–long-mode= on | off ] [–ibpb-on-vm-exit= on | off ] [–ibpb-on-vm-entry= on | off ] [–spec-ctrl= on | off ] [–l1d-flush-on-sched= on | off ] [–l1d-flush-on-vm-entry= on | off ] [–mds-clear-on-sched= on | off ] [–mds-clear-on-vm-entry= on | off ] [–cpu-profile= host | Intel 8086 | Intel 80286 | Intel 80386 ] [–hpet= on | off ] [–hwvirtex= on | off ] [–triple-fault-reset= on | off ] [–apic= on | off ] [–x2apic= on | off ] [–paravirt-provider= none | default | legacy | minimal | hyperv | kvm ] [–paravirt-debug= key=value [,key=value…] ] [–nested-paging= on | off ] [–large-pages= on | off ] [–vtx-vpid= on | off ] [–vtx-ux= on | off ] [–nested-hw-virt= on | off ] [–virt-vmsave-vmload= on | off ] [–accelerate-3d= on | off ] [–accelerate-2d-video= on | off ] [–chipset= ich9 | piix3 ] [–iommu= none | automatic | amd | intel ] [–tpm-type= none | 1.2 | 2.0 | host | swtpm ] [–tpm-location= location ] [–bios-logo-fade-in= on | off ] [–bios-logo-fade-out= on | off ] [–bios-logo-display-time=msec] [–bios-logo-image-path=pathname] [–bios-boot-menu= disabled | menuonly | messageandmenu ] [–bios-apic= disabled | apic | x2apic ] [–bios-system-time-offset=msec] [–bios-pxe-debug= on | off ] [–system-uuid-le= on | off ] [–bootX= none | floppy | dvd | disk | net ] [–rtc-use-utc= on | off ] [–graphicscontroller= none | vboxvga | vmsvga | vboxsvga ] [–snapshot-folder= default | pathname ] [–firmware= bios | efi | efi32 | efi64 ] [–guest-memory-balloon=size-in-MB] [–default-frontend= default | name ] [–vm-process-priority= default | flat | low | normal | high ]
其中发现了我刚才使用的参数:[--vram=size-in-MB]
,其中方括号为“可选”,要是尖括号则是“必选”。
通过这样的操作,可以加深对手册的了解和熟悉程度,等下次再有同样的问题,可以直接翻看手册了,节省大量时间。