Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

0007 kali linux install NVIDA graphics card driver

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

0007 kali linux install NVIDA graphics card driver

Now there are a lot of tutorials on the Internet to install NVDIA graphics card drivers on kali Linux, but many of them are you copy me, I copy you, do not go to the actual verification, resulting in many friends according to these tutorials after the installation is either not successful, or kali Linux directly can not start. And I began to wonder if the people who wrote these blogs or tutorials had personally verified the usability of the tutorials.

I was fooled by similar tutorials, so I spent a lot of time installing NVDIA graphics cards, reinstalling the system no less than 20 times. Fortunately, I finally summed up the methods that can withstand everyone's test, in addition to the methods that are bound to succeed. If you successfully install the NVDIA graphics card driver according to my method, your attention is my biggest motivation. I will continue to experiment myself and write a better tutorial. All right, let's get down to business.

After the physical machine installs kali Linux, a very important thing is to install the NVIDA graphics card driver, of course, your computer hardware is to have NVIDA graphics card to install, other graphics card I do not have the environment, I will not study.

Why install the graphics card driver? If our kali Linux is installed on a physical machine, then the graphical interface needs a graphics card. If you only use an open source graphics card driver, your graphics card will not work at all. And it is necessary to use the graphics card driver when doing some password cracking or a large amount of calculation, so it is necessary to install the corresponding driver of the physical hardware video card on the kali Linux operating system.

Because the open source graphics card driver nouveau is installed by default when kali Linux is installed, and this is the reason why the installation of tutorials on our reference network is often not successful or kali Linux cannot be started after installation. So the installation steps should be as follows:

1. Install the Linux kernel header

My kali Linux version is 2018.1, and different versions have different kernel headers. To install kernel headers according to the actual version of your installation, you can use uname-a to see what your kernel version is. The installation commands are as follows:

Apt install linux-headers-4.14.0-kali3-amd64 linux-headers-4.14.0-kali3-common linux-headers-4.14.0-kali3-all2. Disable the open source video card driver nouveau

The disabled commands are as follows:

Root@chaojun:~$ echo-e "blacklist nouveau\ noptions nouveau modeset=0\ nalias nouveau off" > / etc/modprobe.d/blacklist-nouveau.confroot@chaojun:~$ update-initramfs-u & & reboot

After the above operation, the open source graphics card driver is disabled, to be on the safe side, it is important to make sure that the following disable is successful. You can view it using the following command:

Root@chaojun:~$ lsmod | grep-I nouveau

If there is no output from executing the above command, it proves that the open source video card driver nouveau has been successfully disabled.

3. Download the official NVIDA driver

Go to the official website of NVIDA to download the driver http://www.nvidia.com/Download/index.aspx?lang=en-us of the corresponding model. Note that you have to choose the version corresponding to the hardware model of your graphics card, otherwise it will fail. For example, mine is a GTX860M graphics card, so my choice is as follows:

Click SEARCH and you can see the DOWNLOAD button. Click download.

4. Installation

After downloading the video card driver file of NVIDA, use the chmod aquix NVIDIA-Linux-x86_64-384.98.run command to give the driver executable permission. Then use the. / NVIDIA-Linux-x86_64-384.98.run command to install. During installation, you will be prompted with a warning and select yes for all.

5. Configuration

The most important part comes after installation, and you must configure it to let kali Linux know which graphics card driver you are using, otherwise the boot will fail. Execute nvidia-xconfig-- query-gpu-info | grep 'BusID:' | cut-d''- f6 to view the BusID. My display is as follows: PCI:1:0:0. This information is used to configure the following files. The configuration steps are as follows:

5.1. / etc/X11/xorg.conf

Enter the following information for vi / etc/X11/xorg.conf:

Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "EndSectionSection" Device "Identifier" nvidia "Driver" nvidia "BusID" PCI:1:0:0 "EndSectionSection" Screen "Identifier" nvidia "Device" nvidia "Option" AllowEmptyInitialConfiguration "EndSectionSection" Device "Identifier" intel "Driver" modesetting "EndSectionSection" Screen "Identifier intel" Device "intel" intel. / usr/share/gdm/greeter/autostart/optimus.desktop and / etc/xdg/autostart/optimus.desktop

Enter the following information for vi / usr/share/gdm/greeter/autostart/optimus.desktop:

[Desktop Entry] Type=ApplicationName=OptimusExec=sh-c "xrandr-setprovideroutputsource modesetting NVIDIA-0; xrandr-auto" NoDisplay=trueX-GNOME-Autostart-Phase=DisplayServer

Enter the following information for vi / etc/xdg/autostart/optimus.desktop:

[Desktop Entry] Type=ApplicationName=OptimusExec=sh-c "xrandr-setprovideroutputsource modesetting NVIDIA-0; xrandr-auto" NoDisplay=trueX-GNOME-Autostart-Phase=DisplayServer6. Restart

At this point, the graphics card driver is installed and configured, boot enjoy it! Good luck!

Post my official account QR code of Wechat, and the latest article will be released here.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report