As part of the installation step of some software on a Ubuntu VM I'd like to create a samba share. How would I go about doing that from the command line?
You can edit /etc/samba/smb.conf and enter the share name, location, and who should access it. There are several examples in the file itself.
Here's online guide for entering new shares in the smb.conf file: