Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 10-03-2012, 04:58 PM   #1
Registered: Jun 2003
Posts: 165

Rep: Reputation: 16
How to share directory from command line?

On ubuntu 10.04 I know how to share the /media folder by right clicking the /media folder in nautilus, going to sharing options and click "share this folder".

How can I do that from a command prompt in terminal?
Old 10-04-2012, 03:28 AM   #2
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
You can use the commands chmod and chown to change file permissions and ownership in the terminal. Here are some good beginner guides:
I would suggest creating some test files and directories in your /home directory. Fill the directories with useless crap. Then practice changing permissions on those files and directories before you start messing with important data.

Be especially careful if you are planning to change permissions on system files. Under most circumstances you should never have to change permissions or ownership of system files.
Changing permissions on data files in /home or /media is relatively harmless, but practice with test files at first. This is what I did to learn how to do this.
Old 10-04-2012, 04:01 AM   #3
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,261

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
I think he ask about how to share folder on network. It depends which protocol you want to use, you can share by Netbios (Windows method), NFS, sshfs and other. For example for Netbios you need to have installed Samba server and configure it by /etc/samba/smb.conf. In default file are comments specifing how to do it.
Old 10-04-2012, 01:52 PM   #4
Registered: Jun 2003
Posts: 165

Original Poster
Rep: Reputation: 16
Found what I was looking for: the "net usershare" command.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I specify the current directory on the command line powerpleb Linux - Newbie 3 06-11-2008 05:28 AM
share directories from command line tarheel92x Linux - Networking 1 09-07-2004 09:09 PM
Can somebody like share me to write files to DVD disc in command line? exper Linux - Software 3 08-11-2004 07:58 PM
share a samba directory with the command line Mugatu Linux - Software 2 01-08-2004 01:44 PM
mount of samba share hangs on command line Gates1026 Linux - Software 2 11-19-2003 08:57 AM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration