mount share in terminal

I'm looking for 1 line of code to mount to an apple share that I can connect to using afp://macosxserver/public/ as guest.

I think the command is something like
osascript -e 'mount volume "afp://macosxserver/Public"'
LouisSanchezAsked:
Who is Participating?
 
homepupConnect With a Mentor Commented:
Oops, forgot a space. try:

mkdir /Volumes/public ; mount_afp "afp://;AUTH=No%20User%20Authent@macosxserver/public" /Volumes/public/

use

umount /Volumes/public

to disconnect from it.
0
 
nappy_dThere are a 1000 ways to skin the technology cat.Commented:
I think you actually need to do this /sbin/mount -t afpfs //ServerName/shareName "/Volumes/shareName"
0
 
LouisSanchezAuthor Commented:
I keep getting "mount: realpath /Volumes/testdrive: No such file or directory
0
 
homepupCommented:
mkdir /Volumes/public; mount_afp "afp://;AUTH=No%20User%20Authent@macosxserver/public" /Volumes/public/
            
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.