Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Mode 7 Samurai
Jan 9, 2001

Can anyone help me with running a terminal command on system startup?

I want to make it so when the system boots the following command is run: mount -o soft,intr,rsize=8192,wsize=8192 192.168.1.130:/nfs /home/nfs/ which mounts my external NAS to a folder in my hold directory. I have tried a few different methods I found via google, I made a script and added it to the /etc/init.d folder, added it to the rc.local file, added the script to the startup tool in MATE, none of them have worked so far.

Adbot
ADBOT LOVES YOU

Mode 7 Samurai
Jan 9, 2001

I was following through a guide using fstab but in the following line

code:
//servername/sharename  /media/windowsshare  cifs  guest,uid=1000,iocharset=utf8  0  0
I am not sure what to put in the //servername/sharename part. My NAS is a WD My Cloud and when I look in the network it is listed just as WDMYCLOUD, but when I try that as the servername it doesnt work. I also tried using the IP address but that doesnt seem to want to work either.

Edit: To clarify when I try the above method it returns the following:

code:
bash: //WDMYCLOUD/Public: No such file or directory

Mode 7 Samurai fucked around with this message at 19:33 on Feb 27, 2016

Mode 7 Samurai
Jan 9, 2001

SurgicalOntologist posted:

Going off your command line version, try //192.168.1.130/Public or //192.168.1.130/nfs.

Both return "no such file or directory"

Mode 7 Samurai
Jan 9, 2001

I am apparently bad at linux, I cant seem to get this to work. I am new to Linux so its all partially stuff I sort of understand and a bunch of stuff I dont, haha

Mode 7 Samurai fucked around with this message at 01:58 on Feb 28, 2016

Mode 7 Samurai
Jan 9, 2001

Thalagyrt posted:

Open up /etc/fstab in an editor with sudo, and pop a line in for the path you want to mount.

//ip/share /local/mount/point cifs rw,username=username,password=password 0 0

You need to make sure the local mount point exists - so if you use /data for example, make that data directory: sudo mkdir /data

Once that's done, you should be able to mount /data, and you're good to go.

Yeah I think I got the hang of it. I was thinking it worked a different way but after stepping away for a bit and coming back to it I think its working now

  • Locked thread