{"id":6100,"date":"2023-02-19T12:54:09","date_gmt":"2023-02-19T07:24:09","guid":{"rendered":"https:\/\/trysiteprice.com\/blog\/?p=6100"},"modified":"2023-02-19T12:54:09","modified_gmt":"2023-02-19T07:24:09","slug":"linux-disable-usb-devices-disable-loading-of-usb-storage-driver","status":"publish","type":"post","link":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/","title":{"rendered":"Linux Disable USB Devices (Disable loading of USB Storage Driver)"},"content":{"rendered":"<p>To disable USB storage devices on a Linux system, you can prevent the <code>usb-storage<\/code> driver from loading. This will prevent USB mass storage devices (such as USB flash drives or external hard drives) from being recognized by the system. Here are the steps to do this:<\/p>\n<ol>\n<li>Open a terminal window and become the root user by typing:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs\">sudo su<br \/>\n<\/code><\/div>\n<\/div>\n<\/li>\n<li>Open the <code>modprobe<\/code> configuration file <code>\/etc\/modprobe.d\/blacklist.conf<\/code> in a text editor:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs language-bash\">nano \/etc\/modprobe.d\/blacklist.conf<br \/>\n<\/code><\/div>\n<\/div>\n<\/li>\n<li>Add the following line to the end of the file:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs\">blacklist usb-storage<br \/>\n<\/code><\/div>\n<\/div>\n<p>This will prevent the <code>usb-storage<\/code> driver from loading when the system starts up.<\/li>\n<li>Save and exit the file.<\/li>\n<li>To make the change take effect immediately, unload the <code>usb-storage<\/code> module by typing:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs\">modprobe -r usb-storage<br \/>\n<\/code><\/div>\n<\/div>\n<\/li>\n<li>To prevent the <code>usb-storage<\/code> module from loading in the future, add it to the list of modules to be blacklisted in the file <code>\/etc\/modprobe.d\/blacklist.conf<\/code>.<\/li>\n<li>To re-enable USB storage devices, remove the line containing <code>blacklist usb-storage<\/code> from the file <code>\/etc\/modprobe.d\/blacklist.conf<\/code>, or comment it out by placing a <code>#<\/code> character at the beginning of the line.<\/li>\n<\/ol>\n<p>That&#8217;s it! The <code>usb-storage<\/code> driver is now disabled, preventing USB storage devices from being recognized by the system. Note that other USB devices (such as keyboards and mice) will still work normally.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To disable USB storage devices on a Linux system, you can prevent the usb-storage driver from loading. This will prevent USB mass storage devices (such as USB flash drives or external hard drives) from being recognized by the system. Here are the steps to do this: Open a terminal window and become the root user &#8230; <a title=\"Linux Disable USB Devices (Disable loading of USB Storage Driver)\" class=\"read-more\" href=\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\" aria-label=\"Read more about Linux Disable USB Devices (Disable loading of USB Storage Driver)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6100","post","type-post","status-publish","format-standard","hentry","category-best-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice\" \/>\n<meta property=\"og:description\" content=\"To disable USB storage devices on a Linux system, you can prevent the usb-storage driver from loading. This will prevent USB mass storage devices (such as USB flash drives or external hard drives) from being recognized by the system. Here are the steps to do this: Open a terminal window and become the root user ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\" \/>\n<meta property=\"og:site_name\" content=\"TrySitePrice\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-19T07:24:09+00:00\" \/>\n<meta name=\"author\" content=\"Rahul Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\"},\"author\":{\"name\":\"Rahul Sahu\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\"},\"headline\":\"Linux Disable USB Devices (Disable loading of USB Storage Driver)\",\"datePublished\":\"2023-02-19T07:24:09+00:00\",\"dateModified\":\"2023-02-19T07:24:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\"},\"wordCount\":192,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"articleSection\":[\"Best\/Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\",\"name\":\"Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\"},\"datePublished\":\"2023-02-19T07:24:09+00:00\",\"dateModified\":\"2023-02-19T07:24:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trysiteprice.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux Disable USB Devices (Disable loading of USB Storage Driver)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"name\":\"TrySitePrice\",\"description\":\"Free Website Value Calculator Tool\",\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\",\"name\":\"TrySitePrice\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"contentUrl\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"width\":395,\"height\":268,\"caption\":\"TrySitePrice\"},\"image\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\",\"name\":\"Rahul Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"caption\":\"Rahul Sahu\"},\"sameAs\":[\"https:\/\/trysiteprice.com\/blog\"],\"url\":\"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/","og_locale":"en_US","og_type":"article","og_title":"Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice","og_description":"To disable USB storage devices on a Linux system, you can prevent the usb-storage driver from loading. This will prevent USB mass storage devices (such as USB flash drives or external hard drives) from being recognized by the system. Here are the steps to do this: Open a terminal window and become the root user ... Read more","og_url":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/","og_site_name":"TrySitePrice","article_published_time":"2023-02-19T07:24:09+00:00","author":"Rahul Sahu","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#article","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/"},"author":{"name":"Rahul Sahu","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4"},"headline":"Linux Disable USB Devices (Disable loading of USB Storage Driver)","datePublished":"2023-02-19T07:24:09+00:00","dateModified":"2023-02-19T07:24:09+00:00","mainEntityOfPage":{"@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/"},"wordCount":192,"commentCount":0,"publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"articleSection":["Best\/Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/","url":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/","name":"Linux Disable USB Devices (Disable loading of USB Storage Driver) - TrySitePrice","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/#website"},"datePublished":"2023-02-19T07:24:09+00:00","dateModified":"2023-02-19T07:24:09+00:00","breadcrumb":{"@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/trysiteprice.com\/blog\/linux-disable-usb-devices-disable-loading-of-usb-storage-driver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trysiteprice.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Linux Disable USB Devices (Disable loading of USB Storage Driver)"}]},{"@type":"WebSite","@id":"https:\/\/trysiteprice.com\/blog\/#website","url":"https:\/\/trysiteprice.com\/blog\/","name":"TrySitePrice","description":"Free Website Value Calculator Tool","publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/trysiteprice.com\/blog\/#organization","name":"TrySitePrice","url":"https:\/\/trysiteprice.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","contentUrl":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","width":395,"height":268,"caption":"TrySitePrice"},"image":{"@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4","name":"Rahul Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","caption":"Rahul Sahu"},"sameAs":["https:\/\/trysiteprice.com\/blog"],"url":"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/"}]}},"_links":{"self":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/6100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/comments?post=6100"}],"version-history":[{"count":1,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/6100\/revisions"}],"predecessor-version":[{"id":6103,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/6100\/revisions\/6103"}],"wp:attachment":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/media?parent=6100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/categories?post=6100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/tags?post=6100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}