How to access a network folder in Ubuntu using the terminal

16

11

I am new to Ubuntu(and Linux for that matter) and I am trying to access files using the terminal. The network folder is on my Desktop, but when I go to the Desktop folder via the terminal, the network folder is not there.

How do I access files on a network folder via the terminal?

Bobby

Posted 2010-05-04T17:28:06.530

Reputation:

Answers

7

First go to:

/run/user/1000/gvfs/

cd /run/user/1000/gvfs/

In this directory you will find the name and access of the server you connected to. Enter this cd "name of your server"

Now you connected the server from terminal, but before that you need to enter it from the gui

The other way is to use; sshfs

Medhat Helmy

Posted 2010-05-04T17:28:06.530

Reputation: 171

This worked for me on fedora 24. – echoashu – 2019-01-30T07:06:59.710

6

Network locations mounted under GNOME via the GUI are mounted under ~/.gvfs.

Ignacio Vazquez-Abrams

Posted 2010-05-04T17:28:06.530

Reputation: 100 516

2under /run/user/$UID/gvfs for me on Ubuntu 17.04 – Janus Troelsen – 2017-06-08T17:13:11.167

@JanusTroelsen /run/user/$UID/gvfs also works on ubuntu 14 – Alejandro Quiroz – 2017-11-20T23:40:13.837

1Is this still true? I can't confirm this is working on Ubuntu Maverick. I have 2 network folders (1 smb, 1 ftp) mounted via nautilus and they do not appear in ~/.gvfs. – kynan – 2011-09-13T08:41:40.847

this is true for me under Ubuntu 12.04 Precise – Rian Sanderson – 2012-08-17T21:57:16.107

5

First, sudo apt-get install cifs-utils

Next, sudo mkdir -p /mnt/windows/share-name && sudo mount -t cifs //machine-name/share-name /mnt/windows/share-name -o username=your-username,domain=your-domain

It will then prompt you for a password.

If the machine is not domain joined, just use the machine name in place of the domain.

This worked for me just now.

danielpops

Posted 2010-05-04T17:28:06.530

Reputation: 151

4

For Ubuntu 14.04, Ignacio's answer doesn't work. In fact is at other location, as told here.

lucasvc

Posted 2010-05-04T17:28:06.530

Reputation: 174

1

Use smbmount. It mounts a network location to a directory.

petersohn

Posted 2010-05-04T17:28:06.530

Reputation: 2 554

0

Just open required network location in Nautilus, and its address is shown in the Nautilus Location box.

Alex F

Posted 2010-05-04T17:28:06.530

Reputation: 475

The address displayed by nautilus is usually something like "smb://server/share" which doesn't work on the command line – Brian – 2010-05-04T17:54:25.137

1Unless we're talking about an argument to gvfs-mount. But we're not. – Ignacio Vazquez-Abrams – 2010-05-04T17:58:14.597

0

A good way to go is to use find command and search for files on the network location. Found it under: /home/user/.gvfs.

Jeppe

Posted 2010-05-04T17:28:06.530

Reputation: 11