LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I create mount points using the terminal? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-create-mount-points-using-the-terminal-768514/)

nosloj 11-11-2009 04:17 PM

How do I create mount points using the terminal?
 
Aloha,I am in my first week with 9.10 after my two laptops running Windows XP crashed. I installed, made internet connections, and setup evolution mail accounts OK. I am now following instructions from stchman.com/share_NFS.hmtl called "share file using NFS in ubuntu". I have gotten to the point where i am to create mount points and i get the following when i enter "sudo mkdir /network/PC_2" in the terminal on PC #1 [toshiba].

john@toshiba:~$ sudo mkdir /network/PC_2
sudo: unable to resolve host toshiba
mkdir: cannot create directory `/network/PC_2': No such file or directory
john@toshiba:~$

I get the following when i enter "sudo mkdir /network/PC1" in the terminal on PC #2 [sony]

john@sony:-$ sudo mkdir /network/PC_1
[sudo] password for john:
mkdir: cannot create directory '/network/PC_1': No such file or directory
john@sony:-$

I have reviewed the newbie section and googled but i can't find what i need to do to correct my problem. i want to be able to share the files and a printer on both linux computers. I have the printer connected to PC #1.

PC #1 is a Toshiba Satellite P25-S670
PC #2 is a Sony VGN S-150

This is my first post. nosloj

btmiller 11-11-2009 04:20 PM

You need to make the /network directory (it doesn't exist by default, at least not on my 9.10 machine) before you can make any subdirectories of it. If you need to make a network and subdirectory in one shot, try:

mkdir -p /network/PC_1

nosloj 11-12-2009 12:06 PM

How do I create mount points using the terminal?
 
I entered your suggestion and got the following.

john@toshiba:~$ mkdir -p /network/PC_1
mkdir: cannot create directory `/network': Permission denied
john@toshiba:~$

How do I get permission?

Thanks for the help - I need it !

tredegar 11-12-2009 12:16 PM

Try:

sudo mkdir -p /network/PC_1

The -p means "make parent directories if they do not already exist". You can't make PC_1 until /network exists.

or you could do it in 2 steps:

sudo mkdir /network
sudo mkdir /network/PC_1

"Permission denied" usually means you need to be root (or use sudo).

Welcome to LQ!

nosloj 11-12-2009 03:23 PM

(Solved) How do I create mount points using the terminal?
 
Thank you btmiller and tredegar.

I just got back from the library with three books;
How to Do Everything Ubuntu by Jeffrey Orloff
Ubuntu for Non-Geeks-2nd Edition by Rickford Grant
Beginning Ubuntu Linux-From Novice to Professional by Keir Thomas

This should keep me busy and out of your hair for a little while.

nosloj


All times are GMT -5. The time now is 06:00 AM.