Linux Find Out Video Card GPU Memory RAM Size Using Command Line

https:/‮ual.www/‬tturi.com
Linux Find Out Video Card GPU Memory RAM Size Using Command Line

To find out the video card GPU memory (RAM) size on a Linux system using the command line, you can use the lspci command to list the PCI devices on your system, and the grep command to filter the output for video devices.

For example, to find out the GPU memory size of the first video device on your system, you can use the following command:

lspci | grep -i vga | head -n 1 | awk '{print $NF}'

This will list the PCI devices on your system, filter the output for devices with "VGA" in their name (indicating a video device), take the first line of the output (the first video device), and extract the last field (the GPU memory size) from the line.

You can also use the lshw command to list hardware information on your system, and filter the output for video devices. For example:

lshw -C display | grep 'memory' | awk '{print $2}'

This will list the hardware information for display devices on your system, filter the output for lines containing the word "memory" (indicating the GPU memory size), and extract the second field (the GPU memory size) from the line.

You can also use the glxinfo command to display information about the OpenGL implementation on your system, including the GPU memory size. For example:

glxinfo | grep 'Memory' | awk '{print $4}'

This will display the OpenGL implementation information, filter the output for lines containing the word "Memory" (indicating the GPU memory size), and extract the fourth field (the GPU memory size) from the line.

Created Time:2017-10-29 22:08:54  Author:lautturi