{"id":14335,"date":"2026-04-19T01:05:42","date_gmt":"2026-04-19T09:05:42","guid":{"rendered":"https:\/\/stickystatic.com\/tech\/?p=14335"},"modified":"2026-04-19T02:41:32","modified_gmt":"2026-04-19T10:41:32","slug":"linux-network-mount","status":"publish","type":"post","link":"https:\/\/stickystatic.com\/tech\/linux-network-mount","title":{"rendered":"How to Mount a Windows Network Share in Linux (Easy &#038; Permanent)"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux.jpg\" alt=\"windows to linux mount guide\" width=\"1008\" height=\"549\" class=\"alignnone size-full wp-image-14369\" srcset=\"https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux.jpg 1008w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux-360x196.jpg 360w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux-800x436.jpg 800w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux-150x82.jpg 150w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux-768x418.jpg 768w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/mount-windows-to-linux-600x327.jpg 600w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/p>\n<h2>Mount Linux (SMB\/CIFS) from Windows or NAS<\/h2>\n<p><strong>Quick Answer:<\/strong> To mount a Windows share on Linux, install <code>cifs-utils<\/code>, create a mount point, store credentials securely, and run a <code>mount -t cifs<\/code> command.<\/p>\n<div class=\"box\">\n<h2>Quick Steps \u26a1<\/h2>\n<ol>\n<li>Install CIFS tools<\/li>\n<li>Create a mount directory<\/li>\n<li>Create a credentials file<\/li>\n<li>Run the mount command<\/li>\n<li>(Optional) Add to fstab for auto-mount<\/li>\n<\/ol>\n<\/div>\n<h2>Step 1: Install Required Package \ud83d\udd27<\/h2>\n<pre><code>sudo apt update\r\nsudo apt install cifs-utils<\/code><\/pre>\n<p>On RHEL\/CentOS\/Fedora:<\/p>\n<pre><code>sudo dnf install cifs-utils<\/code><\/pre>\n<h2>Step 2: Create a Mount Point \ud83d\udcc1<\/h2>\n<p>You may name the &#8220;network-drive&#8221; whatever you prefer as long as you use the name consistently in following steps.<\/p>\n<pre><code>sudo mkdir -p \/mnt\/network-drive<\/code><\/pre>\n<h2>Step 3: Create Credentials File \ud83d\udd10<\/h2>\n<pre><code>nano ~\/.smbcredentials<\/code><\/pre>\n<p>Add: Use your case sensitive logon credentials<\/p>\n<pre><code>username=your_username\r\npassword=your_password<\/code><\/pre>\n<p>Secure it:<\/p>\n<pre><code>chmod 600 ~\/.smbcredentials<\/code><\/pre>\n<h2>Step 4: Mount the Windows Share \ud83d\udd17<\/h2>\n<p>You must have your server IP Address and file path for this step.<\/p>\n<pre><code>sudo mount -t cifs \/\/SERVER_IP\/SHARE_NAME \/mnt\/network-drive \\\r\n-o credentials=~\/.smbcredentials,vers=3.0<\/code><\/pre>\n<p><strong>Example:<\/strong><\/p>\n<pre><code>sudo mount -t cifs \/\/192.168.1.143\/shared-folder \/mnt\/network-drive \\\r\n-o credentials=~\/.smbcredentials,vers=3.0<\/code><\/pre>\n<h2>Step 5: Verify the Mount \u2705<\/h2>\n<pre><code>df -h<\/code><\/pre>\n<p>or<\/p>\n<pre><code>ls \/mnt\/network-drive<\/code><\/pre>\n<h2>Auto-Mount on Boot (fstab) \u267b\ufe0f<\/h2>\n<pre><code>sudo nano \/etc\/fstab<\/code><\/pre>\n<p>Add:<\/p>\n<pre><code>\/\/SERVER_IP\/SHARE_NAME \/mnt\/network-drive cifs credentials=\/home\/YOUR_USER\/.smbcredentials,_netdev,vers=3.0 0 0<\/code><\/pre>\n<p>Apply:<\/p>\n<pre><code>sudo mount -a<\/code><\/pre>\n<h2>Troubleshooting \u26a0\ufe0f<\/h2>\n<h3>Permission Denied<\/h3>\n<ul>\n<li>Check username and password<\/li>\n<li>Verify Windows share permissions<\/li>\n<\/ul>\n<h3>Mount Error (95)<\/h3>\n<pre><code>vers=2.1<\/code><\/pre>\n<h3>Host is Down<\/h3>\n<ul>\n<li>Check network connection<\/li>\n<li>Verify server IP<\/li>\n<\/ul>\n<h2>Security Best Practices \ud83d\udd12<\/h2>\n<ul>\n<li>Use a credentials file (never plain text in command)<\/li>\n<li>Set permissions to <code>600<\/code><\/li>\n<li>Avoid storing credentials in root unless necessary<\/li>\n<\/ul>\n<h2>FAQ \u2753<\/h2>\n<h3>What is CIFS in Linux?<\/h3>\n<p>CIFS (Common Internet File System) is the protocol used to access Windows shared folders from Linux systems.<\/p>\n<h3>Do I need sudo to mount a Windows share?<\/h3>\n<p>Yes, mounting typically requires root privileges unless configured otherwise.<\/p>\n<h3>How do I auto-mount a network drive in Linux?<\/h3>\n<p>Add the mount entry to <code>\/etc\/fstab<\/code> with the <code>_netdev<\/code> option.<\/p>\n<h3>Why is my SMB mount failing?<\/h3>\n<p>Common causes include missing <code>cifs-utils<\/code>, incorrect credentials, wrong SMB version, or network issues.<\/p>\n<h2>Summary \ud83e\udde0<\/h2>\n<p>Mounting a Windows share on Linux involves installing CIFS tools, creating a mount point, securely storing credentials, and running a mount command. For persistent setups, configure <code>fstab<\/code>.<\/p>\n<hr>\n<p>The following information are the same steps in a different visual format in order to help readers fully understand if there is something you missed in the guide above.<br \/>\nWe do this because sometimes just looking at something from a different angle is all it takes to light the bulb and complete the task.<\/p>\n<h2>Quick Easy No Fluff Network Mount Steps<\/h2>\n<p>This simple guide shows the cleanest way to mount a Windows shared folder or NAS(Network Attached Storage) share so it appears like a normal folder on your Linux desktop.<\/p>\n<p>As a lifelong Windows user now running Linux on my spare computer for AI self hosting, I have run into many problems and this was one of them.<br \/>\nWhen trying to connect to the smb:\/\/ file share it was rejecting my username and password that I was positive was right. After following all of these steps it did work.<\/p>\n<p>I am using Linux Mint(Mate) and ran into countless issues doing such a simple task so after I figured it all out, I made this easy to follow copy-paste guide for you.<\/p>\n<h2>Step 1: Create a Secure Credentials File<\/h2>\n<p>Your going to need to pass the login credentials from your Linux computer to your Windows PC or Network Attached Storage so make sure you know your username and password. Now we create a file with that information.<\/p>\n<div class=\"step\">\nOpen your Linux terminal and run these commands one by one:<\/p>\n<div class=\"warning\"><strong>REPLACE!<\/strong> <code>YOUR_WINDOWS_USERNAME<\/code> and <code>YOUR_WINDOWS_PASSWORD<\/code> with your actual Windows login details.<\/div>\n<p><\/p>\n<pre><code>nano ~\/.smbcredentials<\/code><\/pre>\n<pre><code class=\"language-bash\">username=<span class=\"change\">YOUR_WINDOWS_USERNAME<\/span>\r\npassword=<span class=\"change\">YOUR_ACTUAL_PASSWORD<\/span><\/code><\/pre>\n<pre><code>chmod 600 ~\/.smbcredentials<\/span><\/code><\/pre>\n<\/div>\n<h2>Step 2: Create the Mount Point and Mount the Share<\/h2>\n<div class=\"step\">\nNow we will mount the network drive.<\/p>\n<p>First, find the <strong>IP address<\/strong> of your Windows computer or Network Attached Storage (run <code>ipconfig<\/code> on Windows and note the IPv4 address).<\/p>\n<div class=\"warning\"><strong>Server-Path<\/strong> You will get the true <code>IP Address<\/code> and <code>Server-Path<\/code> to put here.<br \/>\n<strong>Drive-Name:<\/strong> You get to make this one up for your local Linux mounted drive. <code>Drive-Name<\/code> Must remain constant in following steps.<\/div>\n<p><\/p>\n<pre><code>sudo mkdir -p \/mnt\/<span class=\"change\">Drive-Name<\/span><\/code><\/pre>\n<pre><code>sudo apt install cifs-utils<\/code><\/pre>\n<pre><code>sudo mount -t cifs \/\/<span class=\"change\">192.168.1.XX<\/span>\/<span class=\"change\">Server-Path<\/span> \/mnt\/<span class=\"change\">Drive-Name<\/span> \\\r\n  -o credentials=~\/.smbcredentials,vers=3.0<\/code><\/pre>\n<p>Test it:<\/p>\n<pre><code>ls \/mnt\/<span class=\"change\">Drive-Name<\/span><\/code><\/pre>\n<\/div>\n<h2>Step 3: Create a Desktop Shortcut<\/h2>\n<div class=\"step\">\n<p>The easiest way:<\/p>\n<ol>\n<li>Open your file manager and go to <strong>\/mnt\/Drive-Name<\/strong><\/li>\n<li>Hold down <strong>Ctrl + Shift<\/strong> keys<\/li>\n<li>Click and drag from inside the Drive-Name folder onto your desktop<\/li>\n<li>Choose <strong>&#8220;Link Here&#8221;<\/strong> when prompted<\/li>\n<\/ol>\n<p><strong>To change the icon:<\/strong><\/p>\n<ul>\n<li>Right-click the new shortcut on your desktop \u2192 <strong>Properties<\/strong><\/li>\n<li>Click the small icon at the top-left<\/li>\n<li>Choose a better icon (e.g., <strong>folder-remote<\/strong> or any you like)<\/li>\n<\/ul>\n<\/div>\n<h2>Step 4: Make It Mount Automatically on Boot (Optional but Recommended)<\/h2>\n<div class=\"step\">\n<p>Edit the fstab file:<\/p>\n<pre><code>sudo nano \/etc\/fstab<\/code><\/pre>\n<p>Add this line at the very bottom:<\/p>\n<pre><code>\/\/<span class=\"change\">192.168.1.XX<\/span>\/<span class=\"change\">Server-Path<\/span> \/mnt\/<span class=\"change\">Drive-Name<\/span> cifs  credentials=\/home\/$(whoami)\/.smbcredentials,vers=3.0,_netdev,nofail,x-systemd.automount  0  0<\/code><\/pre>\n<p>Save and exit (Ctrl+O \u2192 Enter \u2192 Ctrl+X in nano).<\/p>\n<p>Test the fstab entry:<\/p>\n<pre><code>sudo mount -a<\/code><\/pre>\n<p>If no errors appear, you&#8217;re done. The share will now mount automatically after every reboot.<\/p>\n<\/div>\n<div class=\"warning\"><strong>Tip:<\/strong> Bookmark this page because you will probably have to mount more than one drive in your Linux career and there is no way you will remember all of those complex commands.<\/div>\n<p><strong>Done!<\/strong> You now have a clean desktop shortcut to your Windows or Network share that behaves like a normal folder.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux.jpg\" alt=\"windows mounted on linux pc\" width=\"1536\" height=\"1024\" class=\"alignnone size-full wp-image-14373\" srcset=\"https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux.jpg 1536w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux-360x240.jpg 360w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux-800x533.jpg 800w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux-150x100.jpg 150w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux-768x512.jpg 768w, https:\/\/stickystatic.com\/tech\/wp-content\/uploads\/windows-network-share-linux-600x400.jpg 600w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to mount a Windows network share on Linux using CIFS. Includes secure setup, fstab auto-mount, and troubleshooting.<\/p>\n","protected":false},"author":3,"featured_media":14369,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[58,73,62],"tags":[],"class_list":["post-14335","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-linux","category-networking"],"_links":{"self":[{"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/posts\/14335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/comments?post=14335"}],"version-history":[{"count":38,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/posts\/14335\/revisions"}],"predecessor-version":[{"id":14375,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/posts\/14335\/revisions\/14375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/media\/14369"}],"wp:attachment":[{"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/media?parent=14335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/categories?post=14335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stickystatic.com\/tech\/wp-json\/wp\/v2\/tags?post=14335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}