Edit: I got it ("noauto" in /etc/fstab). Thanks everyone!  

I officially have a linux question!  

I have a mounted network folder on my linux mini pc. (Mounted using "mount -t cifs".)

Now I want to move my mini PC to a different place, where the network device isn't there *yet*. (But will be in the coming months.) What would I need to do to temporarily disable this mount (and later enable it again)?

I don't want the PC to fail on boot (or have a super huge boot time), so I think I have to do this. (Do I?)

Honestly, I don't know what I did with "mount -t cifs" and where the stuff is saved to, but it works - even after reboots. o.o

#linux

@SteffoSpieler There is no good solution for "sometimes there" network drives I know of. That's in my opinion still a huge bummer.
KDE's Dolphin can handle network shares in user space, but that's in my experience a bit brittle. Mount points may change, other users have issues accessing it.

I'm using fusermount in mount/unmount script pairs on my notebook. Not ideal, but the least pain.

@realMagnesium12 Hm, I don't have any GUI on that system. Also, I don't think I'd need to automate that, as this will be only once. (I'm in the process of moving, and that mini PC is hosting my smart home solution while the NAS is still being required for the stuff I do on my desktop - at my current place.)

Is there a config where I can just comment the mounted folder out? (I'd need to figure out how to unmount a folder in general anyway, so knowing where such a file is could help. )

@SteffoSpieler System wide mounts are configured in /etc/fstab.

Was mount -t cifs the complete command? I guess not. Drives mounted this way are mounted not persistent. Doesn't survive a reboot.

@realMagnesium12 ah, I was able to find it in /etc/fstab!

It wasn't the full command, no, but I didn't want to post my credentials to my NAS publicly to fedi 😅

I just took a look into my zsh_history and apparently I did edit /etc/fstab after doing the mount.  

Thanks! Now I just need to find out how to safely comment the mount out. 

Edit: Found out about the "noauto" option. Thanks!

@SteffoSpieler @realMagnesium12

You should look into autofs/automount. It can be a bit painful and somewhat unlogical to configure, but once done ... it will automatically mount configured directories when you're trying to access them.

Just a warning, if you have the mount point as "bookmarks" in the GNOME file manager (nautilus), it will try to mount it each time you open the file manager.

@SteffoSpieler I hope for something like "Add this CIFS/SSH share to my FM and if it is there fine, when not mark it as missing" for nearly ten years.

And a reliable RDP server, but that's something different.

@SteffoSpieler

Have you joined the Linux Furs chat on signal yet?
Maybe they can help you 

@karb @SteffoSpieler Linux Furs Signal Chat 👀
@SteffoSpieler If I had this, I'd check /etc/fstab, hopefully it has a line for that mount, the fourth field supports options like "noauto" for not mounting on boot.
@lukyan That worked, thank you! 

@SteffoSpieler It should have generated an entry in /etc/fstab and you can put a # in front of lines you want to disable.

But please be careful: if you edit other lines you would change other mount points and there's a high likelihood that it would make your machine unbootable (until fixed).

It might be a good idea to make a copy before attempting any change.

@SteffoSpieler okay, the best place to start looking for an answer in Linux is the man pages. You can enter `man mount' in your terminal or go here:

https://linux.die.net/man/8/mount

This will tell you everything you need to know about the mount command. If something you read there doesn't make sense to you, do a Duck Duck Go or search for the man page for whatever command was mentioned.

That said… it's probably the umount command you really wanna know about:

https://linux.die.net/man/8/umount

It might be as simple as running 'umount -t cifs' moving your stuff, and running 'mount -t cifs' again when your network becomes available again.

mount(8): mount filesystem - Linux man page

mount -a [-t type] [-O optlist] (usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having ...