Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Finding connected network drive in terminal

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
biebert
Posts: 3
Joined: 2017-10-27 21:11

Finding connected network drive in terminal

#1 Post by biebert »

Hello,

I could not find an answer to what I hope is an easy question, it may be my lack of knowledge of the correct terminology to see any previous topics about this.

I connected to a network drive on my work server from a remote computer by typing "smb://<server>/<directory>/" info into the file manager address bar, and connected to the drive without trouble. I am now trying to access the directory from the terminal, but cannot find the directory. I can see the connected directory under the "NETWORK" area of the File Manager, so I am pretty sure I am connected. I am accustomed to finding the directory under /Volumes/<directory> on macOS terminal, but cannot find the equivalent directory on the Debian 8 OS I am currently using.

I tried just dragging and dropping the directory from the file manager into terminal, but i get this "bash: smb://<server>/<directory>/: no such file or directory"

Hopefully the terminology I used is somewhat understandable, and thank you for your help.

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: Finding connected network drive in terminal

#2 Post by Soapm »

You want to create a directory then mount the share there.

Here is one from my windows machine mounted in "Archive" directory...

Code: Select all

//192.168.0.xxxx/Archive /archive cifs username=****,password=****,sec=ntlmv2  0 0

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Finding connected network drive in terminal

#3 Post by p.H »

If the file manager mounted the remote filesystem, you can found the mount point with the command "mount".
But the file manager may access the filesystem without mounting it.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#4 Post by debiman »

output of

Code: Select all

mount
please.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Finding connected network drive in terminal

#5 Post by GarryRicketson »

On some file managers you can select the directory, >right click the mouse> open in terminal.
Also :
Finding connected network drive in terminal
Has a lot of tutorials and instructions on this.

biebert
Posts: 3
Joined: 2017-10-27 21:11

Re: Finding connected network drive in terminal

#6 Post by biebert »

I appreciate all the help, I may just need to learn more about using Debian before I can sort this out. Not sure if the fact I am using a virtual machine on my windows machine may affect any of the outputs
debiman wrote:output of

Code: Select all

mount
please.
This is my mount output
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=2056552,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=3293908k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
none on /media/sf_Host type vboxsf (rw,nodev,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1646956k,mode=700,uid=1000,gid=1000)
Soapm wrote:You want to create a directory then mount the share there.

Here is one from my windows machine mounted in "Archive" directory...

Code: Select all

//192.168.0.xxxx/Archive /archive cifs username=****,password=****,sec=ntlmv2  0 0
I tried this but unfortunately when I try to mount into the directory i created, the terminal cant seem to find the network directory I specify to mount into the directory on my machine
GarryRicketson wrote:On some file managers you can select the directory, >right click the mouse> open in terminal.
Also :
Finding connected network drive in terminal
Has a lot of tutorials and instructions on this.
the right click thing works for other directories, just not the one that appears to be mounted under NETWORK. the search link was helpful, most of them refer to using the smbclient, or mountsmb, but those don't seem to be commands recognized by my machine, I made sure samba was installed. or they refer to finding ~/gvfs, which I found but had nothing in it

Thanks again for the help

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#7 Post by debiman »

biebert wrote:This is my mount output...
no remote drive seems to be mounted.
which means you can't access it, whether in a terminal or elsewhere.

i have no experience with smb/samba, but my nfs mounts show up in /etc/mtab.

i'd have a hard time understaning how you can access a remote filesystem without mounting it?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Finding connected network drive in terminal

#8 Post by p.H »

debiman wrote:i'd have a hard time understaning how you can access a remote filesystem without mounting it?
Some tools allow to access a filesystem contents without mounting it.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#9 Post by debiman »

p.H wrote:Some tools allow to access a filesystem contents without mounting it.
that's a very smart remark but has no impact on the thread whatsoever.
thanks for pointing it out though, you really made my day.

biebert
Posts: 3
Joined: 2017-10-27 21:11

Re: Finding connected network drive in terminal

#10 Post by biebert »

debiman wrote:
p.H wrote:Some tools allow to access a filesystem contents without mounting it.
that's a very smart remark but has no impact on the thread whatsoever.
thanks for pointing it out though, you really made my day.
Well at least I learned that piece, now I can focus on how to actually mount it so I can access it through terminal, my attempt at a shortcut by just typing the "smb://**server**/directory" into the filemanager address bar at least gave me access, and can work from here.

Thank you for the help

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#11 Post by debiman »

biebert wrote:typing the "smb://**server**/directory" into the filemanager address bar at least gave me access, and can work from here.
quick idea:
does your filemanager offer to "open a terminal in current folder"?
try that, what is the working directory?

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Finding connected network drive in terminal

#12 Post by pendrachken »

debiman wrote:
biebert wrote:This is my mount output...
no remote drive seems to be mounted.
which means you can't access it, whether in a terminal or elsewhere.

i have no experience with smb/samba, but my nfs mounts show up in /etc/mtab.

i'd have a hard time understaning how you can access a remote filesystem without mounting it?

Through GVFS / KIOSlaves. Like it has been done for a decade or more on GNOME / KDE respectively. Like it is working here since the OP can access the files through the GUI file manager.


Do your research or don't post. You have been giving absolute crap advice for quite a while now, I'm assuming to inflate your post count. Just stop.


I tried this but unfortunately when I try to mount into the directory i created, the terminal cant seem to find the network directory I specify to mount into the directory on my machine
You need both the name or IP address of the server and a place to mount the share.

do this step by step:

Code: Select all

#log into a terminal as your USER and type

mkdir ~/samba

#remember Linux is CaSeSensitive, so "Samba" and "samba" and "sAmba" are all different directories. 

#find the IP address of the server that has your SMB shares and the share export name

su
#input your root password when asked by the su command

#USER and GROUP should be your user and group name. 

mount //IP.ADDRESS/exportname /home/USER/samba USER AND PASSWORD OPTIONS

# see the man pages for mounting smb shares, or just look up the options up online
Following these directions should get you a passably mounted share. If not, exact error messages need to be kept so that people can more accurately see what is going wrong.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#13 Post by debiman »

pendrachken wrote:Through GVFS / KIOSlaves. Like it has been done for a decade or more on GNOME / KDE respectively. Like it is working here since the OP can access the files through the GUI file manager.

Do your research or don't post. You have been giving absolute crap advice for quite a while now, I'm assuming to inflate your post count. Just stop.
i also stated that i am not familiar with samba/smb.
which seems to make use of gvfs.
and if i'm not 100% sure of something, i always make it clear in my posts.
it seems you, on the other hand, perceive yourself as an undisputed authority here?
i understand your criticism of my knowledge, but not the rest.
this reaction is totally over the top. reported.
and i think an apology is in order.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Finding connected network drive in terminal

#14 Post by GarryRicketson »

Agreed, on a apology is in order.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Finding connected network drive in terminal

#15 Post by pendrachken »

Hell no, Gary. Just no. This isn't a "safe space", the little snowflake doesn't get to get out of feeling bad because he was offended by the truth. And You don't get to support him because you also have been told the same thning by multiple of us old-timers as well.


I am NOT going to apologize for telling the truth.


1: He tries to tell the OP that something isn't working at all, when the OP says in the first post that it is working. I.E. samba shares are mounted by GVFS in the file manager. Yet debiman claims that "samba isn't connected at all" since mount doesn't show it, when even the most cursory google search would show that shares mounted in these file managers DON'T use the system mount commands.

2: Posts stupid crap just to get his post count up. Like in this thread: posts "try to right click and "open terminal here" ", 5 days after the thread starter posts that the same trick doesn't work with the GVFS mounted shares.


So no, I will not apologize. Period. End of story.

If you want to ban me go right ahead, I don't give a crap anymore. You will be losing one of the few people around here that actually answers questions when they post though. Like my explanation of how to mount SMB shares from the terminal that followed in my previous post.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#16 Post by debiman »

@biebert:
it seems i was wrong in the below quoted post, and p.H was right (though i cannot see why they would choose this sort of cryptic remark, instead of something _helpful_).
debiman wrote:
p.H wrote:Some tools allow to access a filesystem contents without mounting it.
that's a very smart remark but has no impact on the thread whatsoever.
thanks for pointing it out though, you really made my day.
@pedrachken:
i can see you visit seldom; we will see how you choose to react next time you do.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#17 Post by debiman »

the last post got past me somehow.
just to "inflate my post count" even more, i reply:
pendrachken wrote:Hell no, Gary. Just no. This isn't a "safe space", the little snowflake doesn't get to get out of feeling bad because he was offended by the truth. And You don't get to support him because you also have been told the same thning by multiple of us old-timers as well.

I am NOT going to apologize for telling the truth.

1: He tries to tell the OP that something isn't working at all, when the OP says in the first post that it is working. I.E. samba shares are mounted by GVFS in the file manager. Yet debiman claims that "samba isn't connected at all" since mount doesn't show it, when even the most cursory google search would show that shares mounted in these file managers DON'T use the system mount commands.

2: Posts stupid crap just to get his post count up. Like in this thread: posts "try to right click and "open terminal here" ", 5 days after the thread starter posts that the same trick doesn't work with the GVFS mounted shares.

So no, I will not apologize. Period. End of story.

If you want to ban me go right ahead, I don't give a crap anymore. You will be losing one of the few people around here that actually answers questions when they post though. Like my explanation of how to mount SMB shares from the terminal that followed in my previous post.
no-one says you should apologize for telling the truth.

that's not what i was asking for (more about that later).

but you should also tell the truth! so, about your reply quoted above:
you are simplifying and misreading what really happened in this thread. you are paraphrasing, instead of quoting - i never said "samba isn't connected at all". that's just the first example, interested readers (if any) may find more.
don't paraphrase. quote the facts, or leave it. because anything beyond that must necessarily be colored by your own emotions and i'm really not interested in those.

i never claim to be right if i'm not 100% sure i'm right. i use the conditional when appropriate (which you seem to fail to recognize, and i will make no assumptions about your level of education now).

i understand that this thread reads differently for someone who comes to read the whole thread as it is now, but this has been an ongoing conversation, which you also seem to fail to recognize.
my guess is you visit here once a week or so and pick the thread where you think you can let go of most of your "righteous" anger. anger about how the whole manly linux community has developed into a bunch of snowflakes.

no my friend*, the only "righteous" you are is self-righteous and pompous.

PS:
i'm quite happy with this being an "unsafe space", i just prefer to do things differently.
my report was closed along those lines: "I like to think members have a bit more scope to express their opinions, including a right of rebuttal".
fine by me, let's go all old testament. a kick in the butt for a kick in the butt.
Last edited by debiman on 2017-11-07 07:13, edited 1 time in total.

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Finding connected network drive in terminal

#18 Post by 4D696B65 »

Please stop the name calling.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Finding connected network drive in terminal

#19 Post by dilberts_left_nut »

debiman wrote:my report was closed along those lines: "I like to think members have a bit more scope to express their opinions, including a right of rebuttal".
You skipped the rest of that sentence...
dilberts_left_nut wrote:without crossing the line to abuse.
Please don't.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Finding connected network drive in terminal

#20 Post by debiman »

dilberts_left_nut wrote:
debiman wrote:my report was closed along those lines: "I like to think members have a bit more scope to express their opinions, including a right of rebuttal".
You skipped the rest of that sentence...
dilberts_left_nut wrote:without crossing the line to abuse.
Please don't.
but who's to say where that line is? i think pendrachken crossed it.

Post Reply