Install cuda and optimus on Kali Linux

It’s a hard job to install cuda and optumus on Kali Linux,I tried all day and finally success,this is how it words.

Install cuda and nvidia driver
It’s really simple,and it may take some time,it’s not the latest version,but it works.

apt-get update

apt-get install nvidia-detect nvidia-libopencl1 nvidia-opencl-common nvidia-support nvidia-opencl-icd nvidia-visual-profiler nvidia-glx nvidia-installer-cleanup nvidia-kernel-common nvidia-smi nvidia-alternative nvidia-opencl-dev libglx-nvidia-alternatives nvidia-kernel-dkms nvidia-cuda-toolkit nvidia-vdpau-driver nvidia-xconfig glx-alternative-nvidia libgl1-nvidia-alternatives nvidia-settings libgl1-nvidia-glx xserver-xorg-video-nvidia libcublas4 libcudart4 libcufft4 libnpp4 libnvidia-compiler libcuda1 libcuinj4 libnvidia-ml1 libxvmcnvidia1 libcusparse4 libcurand4 python-pycuda-doc python-pycuda-headers python-pycuda nvidia-cuda-doc nvidia-cuda-gdb

During the process,there are some information to confirm,just press ok.After that,we need to add these to the /root/.bashrc

export PATH

Reboot the computer.

Install pyrit-cuda
The wo will compile a pyrit with cuda,download the source from here.

We nedd both pyrit-0.4.0.tar.gz and cpyrit-cuda-0.4.0.tar.gz,and wo need soom lib and tools to complete the compile.

atp-get install libpcap-dev python2.7-dev

Decompress the pyrit-0.4.0.tar.gz,and install

tar -xzvf pyrit-0.4.0.tar.gz
cd pyrit-0.4.0
python build
python install

Decompress the cpyrit-cuda-0.4.0.tar.gz

tar -xzvf cpyrit-cuda-0.4.0.tar.gz
cd cpyrit-cuda-0.4.0

Here wo nedd edit the,line 35,edit it from

for path in ('/usr/local/cuda', '/opt/cuda'):


for path in ('/usr/local/cuda','/usr/lib/nvidia-cuda-toolkit','/opt/cuda'):

So the nvcc could be found during the process,then install

python build
python install

After that ,We can try it

pyrit list_cores

You should find the CUDA-Device

#1: 'CUDA-Device #1 'GeForce 8400 GS''
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'
#5: 'CPU-Core (SSE2)'
#6: 'CPU-Core (SSE2)'
#7: 'CPU-Core (SSE2)'
#8: 'CPU-Core (SSE2)'

Install optimus
Get the apt-key

wget -O - | apt-key add -

Edit the source of Bumblebee to the /etc/apt/source.list

deb sid main contrib
deb-src sid main

Then install

apt-get update
apt-get install bumblebee bumblebee-nvidia

Add the root to the bumblebee group

adduser root bumblebee

Reboot,and you can run

optirun glxspheres

You will find out the fps is different.

本文标题:Install cuda and optimus on Kali Linux


0 条评论。


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>