LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-03-2012, 04:58 PM   #1
redss
Member
 
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
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,221

Rep: Reputation: 285Reputation: 285Reputation: 285
You can use the commands chmod and chown to change file permissions and ownership in the terminal. Here are some good beginner guides:
http://www.tuxfiles.org/linuxhelp/filepermissions.html
http://www.tuxfiles.org/linuxhelp/fileowner.html

http://linuxcommand.org/lts0070.php
http://www.linuxclues.com/articles/16.htm
http://www.redhat.com/mirrors/LDP/LD...rmissions.html
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
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Kubuntu
Posts: 1,189

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
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
redss
Member
 
Registered: Jun 2003
Posts: 165

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 01:05 AM.

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