Skip to main content

Command Palette

Search for a command to run...

Mount NTFS Partition with Desktop Shortcut in Ubuntu

Easily access and manage your Windows NTFS partitions on Ubuntu with one-click shortcuts.

Updated
โ€ข2 min read
Mount NTFS Partition with Desktop Shortcut in Ubuntu

๐Ÿ”ง Problem

When I plugged in my NTFS drive, Ubuntu gave me errors like: Error mounting /dev/sdb2 at /media/fatboy/win_128: wrong fs type, bad superblock on /dev/sdb2, missing codepage or helper program

This usually happens when:

  • NTFS support (ntfs-3g) is missing

  • The drive was not safely removed in Windows (hibernated / Fast Startup enabled)

  • The drive needs manual mounting instead of automatic GUI mounting

โœ… Solution Overview

  1. Install NTFS support (ntfs-3g)

  2. Create a mount point (/media/$USER/win_128)

  3. Mount the drive manually to test

  4. Create a .desktop launcher file to mount with a click

  5. Trust the launcher so GNOME lets it run

โš™๏ธ Step 1: Install NTFS Support

sudo apt update
sudo apt install ntfs-3g

๐Ÿ“‚ Step 2: Create a Mount Point

sudo mkdir -p /media/$USER/win_128

๐Ÿ’ป Step 3: Mount the Drive Manually

sudo mount -t ntfs-3g /dev/sdb2 /media/$USER/win_128
ls /media/$USER/win_128

๐Ÿ–ฅ Step 4: Create a Desktop Launcher

sudo nano ~/Desktop/mount_win_128.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Mount Win_128
Comment=Mount NTFS partition win_128
Exec=sh -c 'pkexec mount -t ntfs-3g /dev/sdb2 /media/$USER/win_128'
Icon=drive-harddisk
Terminal=false
Categories=Utility;

๐Ÿ”’ Step 5: Allow Launching

chmod +x ~/Desktop/mount_win_128.desktop
gio set ~/Desktop/mount_win_128.desktop metadata::trusted true

๐Ÿ›‘ Bonus: Unmount Shortcut

[Desktop Entry]
Version=1.0
Type=Application
Name=Unmount Win_128
Comment=Unmount NTFS partition win_128
Exec=sh -c 'pkexec umount /media/$USER/win_128'
Icon=media-eject
Terminal=false
Categories=Utility;

๐Ÿ›‘ Bonus: Unmount Shortcut 2.0

sudo nano ~/Desktop/toggle_mount.desktop
sudo chmod +x ~/Desktop/toggle_mount.desktop
gio set ~/Desktop/toggle_mount.desktop metadata::trusted true
[Desktop Entry]
Version=1.0
Type=Application
Name=Toggle Win_128
Comment=Mount/Unmount NTFS partition win_128
Icon=drive-harddisk
Terminal=false
Categories=Utility;
Exec=sh -c 'MP="/media/$USER/win_128"; DEV="/dev/sdb2"; mkdir -p "$MP"; if mountpoint -q "$MP"; then pkexec umount "$MP" && notify-send "Win_128" "Unmounted $D>

๐ŸŽฏ Result Now I can mount and unmount my Windows partition with a single click.

More from this blog

M

Masud Rana

51 posts

I am highly skilled full-stack software engineer specializing in Laravel, PHP, JS, React, Vue, Inertia.js, and Shopify, with strong experience in Filament Frontend and prompt engineering.