Linux fstab: mount a path containing spaces

Just ran across that, so here it is.

Let’s say you want to CIFS mount a windows share — say “//server01/it stuff$”, but your Windows admin put spaces in the path.
Replace the spaces with 40.

So, in your /etc/fstab, the line would give:

[sourcecode language=’bash’]//server01/it40stuff$ /home/fblaise/mnt/MyITDrive cifs username=fblaise,password=yoursinhere,uid=1000,gid=100,_netdev 0 0[/sourcecode]

It will then work, and your linux apps which cannot see beyond your local filesystems will have a new life 😉

Leave a Reply