Skip to content

Instantly share code, notes, and snippets.

@n8acl
Last active August 23, 2024 13:44
Show Gist options
  • Save n8acl/dab196ce30e1e2139727cb7f76d300d6 to your computer and use it in GitHub Desktop.
Save n8acl/dab196ce30e1e2139727cb7f76d300d6 to your computer and use it in GitHub Desktop.
RTL-SDR install bash script
#! /bin/bash
echo "-------------------------------------------"
echo "-- Installing needed packages from repos --"
echo "-------------------------------------------"
sudo apt-get install -y git cmake libffi-dev libssl-dev build-essential libusb-1.0-0-dev pkg-config
echo "------------------------------------------------"
echo "-- Cloning rtl-sdr driver files from osmocom --"
echo "------------------------------------------------"
sudo git clone https://github.com/osmocom/rtl-sdr.git
echo "------------------------------------------------"
echo "-- Building and Installing drivers --"
echo "------------------------------------------------"
cd rtl-sdr
sudo mkdir build
cd build
sudo cmake ../ -DINSTALL_UDEV_RULES=ON
sudo make
sudo make install
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
sudo ldconfig
echo "------------------------------------------------"
echo "-- Blacklisting Certain RTL-SDR drivers --"
echo "------------------------------------------------"
sudo touch /etc/modprobe.d/blacklist-rtl.conf
sudo echo "blacklist dvb_usb_rtl28xxu" >> /etc/modprobe.d/blacklist-rtl.conf
sudo echo "blacklist rtl2832" >> /etc/modprobe.d/blacklist-rtl.conf
sudo echo "blacklist rtl2830" >> /etc/modprobe.d/blacklist-rtl.conf
cat /etc/modprobe.d/blacklist-rtl.conf
echo "------------------------------------------------"
echo "-- Now Reboot System and plug in RTL-SDR --"
echo "------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment