Symlink from one workstation to another without mount

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite
4












I am trying to create a symlink of a file on one linux workstation to another linux workstation, without having to 'mount' any network shares. Here's what I am trying to do, but can't get it to work.



ln -s /link/to/local/file.mov //10.0.1.103/sharedFolder/symlinkFile.mov









share|improve this question



















  • 1




    You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
    – deltab
    Jul 21 '14 at 5:24










  • Sorry, missed off the -s. I have now added it.
    – speedyrazor
    Jul 21 '14 at 5:27










  • When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
    – deltab
    Jul 21 '14 at 5:33










  • I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
    – speedyrazor
    Jul 21 '14 at 5:39










  • If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
    – SHW
    Jul 21 '14 at 5:56














up vote
4
down vote

favorite
4












I am trying to create a symlink of a file on one linux workstation to another linux workstation, without having to 'mount' any network shares. Here's what I am trying to do, but can't get it to work.



ln -s /link/to/local/file.mov //10.0.1.103/sharedFolder/symlinkFile.mov









share|improve this question



















  • 1




    You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
    – deltab
    Jul 21 '14 at 5:24










  • Sorry, missed off the -s. I have now added it.
    – speedyrazor
    Jul 21 '14 at 5:27










  • When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
    – deltab
    Jul 21 '14 at 5:33










  • I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
    – speedyrazor
    Jul 21 '14 at 5:39










  • If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
    – SHW
    Jul 21 '14 at 5:56












up vote
4
down vote

favorite
4









up vote
4
down vote

favorite
4






4





I am trying to create a symlink of a file on one linux workstation to another linux workstation, without having to 'mount' any network shares. Here's what I am trying to do, but can't get it to work.



ln -s /link/to/local/file.mov //10.0.1.103/sharedFolder/symlinkFile.mov









share|improve this question















I am trying to create a symlink of a file on one linux workstation to another linux workstation, without having to 'mount' any network shares. Here's what I am trying to do, but can't get it to work.



ln -s /link/to/local/file.mov //10.0.1.103/sharedFolder/symlinkFile.mov






linux symlink remote ln






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 21 '14 at 5:38

























asked Jul 21 '14 at 5:14









speedyrazor

123115




123115







  • 1




    You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
    – deltab
    Jul 21 '14 at 5:24










  • Sorry, missed off the -s. I have now added it.
    – speedyrazor
    Jul 21 '14 at 5:27










  • When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
    – deltab
    Jul 21 '14 at 5:33










  • I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
    – speedyrazor
    Jul 21 '14 at 5:39










  • If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
    – SHW
    Jul 21 '14 at 5:56












  • 1




    You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
    – deltab
    Jul 21 '14 at 5:24










  • Sorry, missed off the -s. I have now added it.
    – speedyrazor
    Jul 21 '14 at 5:27










  • When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
    – deltab
    Jul 21 '14 at 5:33










  • I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
    – speedyrazor
    Jul 21 '14 at 5:39










  • If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
    – SHW
    Jul 21 '14 at 5:56







1




1




You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
– deltab
Jul 21 '14 at 5:24




You need -s to make a symlink; otherwise you're trying to make a hard link, and those can only be made on the same filesystem.
– deltab
Jul 21 '14 at 5:24












Sorry, missed off the -s. I have now added it.
– speedyrazor
Jul 21 '14 at 5:27




Sorry, missed off the -s. I have now added it.
– speedyrazor
Jul 21 '14 at 5:27












When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
– deltab
Jul 21 '14 at 5:33




When you say "can't get it to work", what actually happens when you try? Also, what are you using that would make //10.0.1.103 refer to another machine, and not just a subdirectory of / called 10.0.1.103?
– deltab
Jul 21 '14 at 5:33












I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
– speedyrazor
Jul 21 '14 at 5:39




I have updated the question to show that on //10.0.1.103 (the other linux workstation on the same network) has a shared folder (sharedFolder). So rather than mounting that shared folder, can I just link straight to it, like you can on Windows PC?
– speedyrazor
Jul 21 '14 at 5:39












If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
– SHW
Jul 21 '14 at 5:56




If you have not mounted any network share then said symlink will be "dangling" pointer. Why you want to do this ?
– SHW
Jul 21 '14 at 5:56










3 Answers
3






active

oldest

votes

















up vote
10
down vote



accepted










You can't:



A symlink is simply an extra inode (a structure that points to the file) and this inode consists of, amongst other things, a deviceId and an inode pointer. The deviceId effectively points to a device special file within the /dev directory and the inode pointer points to a block on that device.



Your network location of 10.0.1.103 does not and cannot have an deviceId (it's not in /dev) therefore you can't possibly have a symlink to a network location.



On the other hand, a mounted network share will have a deviceId which is why you can create a symlink to a mounted location.






share|improve this answer
















  • 1




    Not the answer I wanted, but honest and clear, cheers.
    – speedyrazor
    Jul 21 '14 at 11:29






  • 1




    That is not how symlinks work.
    – Michael Homer
    Mar 1 '17 at 21:37










  • @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
    – stek29
    Mar 12 at 21:01

















up vote
6
down vote













Windows has a special syntax \MACHINEDIRECTORY…FILE meaning the file located at DIRECTORY…FILE on the machine called \MACHINE over the SMB protocol. This is built into the operating system and specialized to one network protocol.



Linux has a flexible filesystem based on the notion of mounting. Filesystems are attached to an existing directory, and the administrator gets to choose how to arrange the directory hierarchy. For more background, read What is meant by mounting a device in Linux?, Why is Linux's filesystem designed as a single directory tree? and What mount points exist on a typical Linux system?. Linux supports many network filesystems (i.e. filesystems that allow one machine to access files on another machine), including NFS, SMB, SSHFS, etc.



NFS can be considered Linux's native network filesystem, the way SMB is Windows's. However Linux doesn't export its files by default: you need to install an NFS server. An NFS server is available in all Linux distributions, but requires a bit of setup (you need to register the directories you want to export in the file /etc/exports). Furthermore NFS is from a gentler time when attackers on the local network weren't a concern, and securing it requires a bit of knowledge about firewalls which is beyond the scope of this answer. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory), assuming that it is exported by the remote machine, run the following command as root:



mount foo.example.com:/some/where /local/dir


The easy way to access remote files with next to no setup is over SSHFS. All you need is to install an SSH server on the remote machine, and the sshfs package on the local machine. You should also generate a key (see How to make password-less login work), though you don't have to do it if you don't mind entering your password each time. SSH is additionally useful to run commands on the remote machine. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory) over SSHFS, run the following command (as your usual user):



sshfs foo.example.com:/some/where /local/dir


Linux can be a server or a client for the SMB protocol (communicating with Windows machines, or even with other Linux machines though it's less well integrated than other protocols) through the Samba software.



You can set up an automounter (such as autofs) so that accessing certain directories automatically mounts directories from some remote machine. For example, a common configuration arranges that the autofs filesystem is mounted on the directory /net, and accessing /net/MACHINE/DIRECTORY causes the remote directory /DIRECTORY from /net/MACHINE to be mounted over NFS at that location (and it will be unmounted after a certain period of inactivity). The remote machine must of course have an NFS server set up and allowing that connection.



It is possible to set up an automounter with SSHFS. See Totally Seamless SSHFS under Linux using Fuse and Autofs and Autofs and sshfs – the perfect couple for quick tutorials; in a nutshell:



  1. Install autofs and sshfs.


  2. Add the following line to /etc/auto.master:



    /mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost


    Replace the two occurrences of 1000 by your user id and group id (run id -u and id -g to show these values). Create the directory /mnt/sshfs.




  3. Create a file /etc/auto.sshfs containing lines like the following:



    machinename -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#machinename.example.com:


    where machinename.example.com is the host name (or IP address) of the remote machine and machinename is the name you want to access it as locally, via the path /mnt/sshfs/machinename.



Autosshfs provides a more convenient autofs+sshfs setup.



Finally, regarding the symbolic part: you can create a symbolic link to a non-existent path. The symbolic link is the second argument, so you'll need something like



ln -s /net/10.0.1.103/sharedFolder/symlinkFile.mov /link/to/local/file.mov


You'll need to manually or automatically arrange for /sharedFolder from 10.0.1.103 to be mounted at /net/10.0.1.103/sharedFolder.






share|improve this answer





























    up vote
    0
    down vote













    For what it's worth ...



    I have worked on a small tool called lionfs which is based on Raphael S. Carvalho's GhostFS. The goal is to allow symbolic links pointing to an URI. It is fairly incomplete, have a lot of issues, and currently supports only HTTP. FUSE (Filesystem in Userspace) is used to handle the background.






    share|improve this answer


















    • 1




      Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
      – phk
      Oct 26 '16 at 19:07










    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f145636%2fsymlink-from-one-workstation-to-another-without-mount%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    10
    down vote



    accepted










    You can't:



    A symlink is simply an extra inode (a structure that points to the file) and this inode consists of, amongst other things, a deviceId and an inode pointer. The deviceId effectively points to a device special file within the /dev directory and the inode pointer points to a block on that device.



    Your network location of 10.0.1.103 does not and cannot have an deviceId (it's not in /dev) therefore you can't possibly have a symlink to a network location.



    On the other hand, a mounted network share will have a deviceId which is why you can create a symlink to a mounted location.






    share|improve this answer
















    • 1




      Not the answer I wanted, but honest and clear, cheers.
      – speedyrazor
      Jul 21 '14 at 11:29






    • 1




      That is not how symlinks work.
      – Michael Homer
      Mar 1 '17 at 21:37










    • @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
      – stek29
      Mar 12 at 21:01














    up vote
    10
    down vote



    accepted










    You can't:



    A symlink is simply an extra inode (a structure that points to the file) and this inode consists of, amongst other things, a deviceId and an inode pointer. The deviceId effectively points to a device special file within the /dev directory and the inode pointer points to a block on that device.



    Your network location of 10.0.1.103 does not and cannot have an deviceId (it's not in /dev) therefore you can't possibly have a symlink to a network location.



    On the other hand, a mounted network share will have a deviceId which is why you can create a symlink to a mounted location.






    share|improve this answer
















    • 1




      Not the answer I wanted, but honest and clear, cheers.
      – speedyrazor
      Jul 21 '14 at 11:29






    • 1




      That is not how symlinks work.
      – Michael Homer
      Mar 1 '17 at 21:37










    • @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
      – stek29
      Mar 12 at 21:01












    up vote
    10
    down vote



    accepted







    up vote
    10
    down vote



    accepted






    You can't:



    A symlink is simply an extra inode (a structure that points to the file) and this inode consists of, amongst other things, a deviceId and an inode pointer. The deviceId effectively points to a device special file within the /dev directory and the inode pointer points to a block on that device.



    Your network location of 10.0.1.103 does not and cannot have an deviceId (it's not in /dev) therefore you can't possibly have a symlink to a network location.



    On the other hand, a mounted network share will have a deviceId which is why you can create a symlink to a mounted location.






    share|improve this answer












    You can't:



    A symlink is simply an extra inode (a structure that points to the file) and this inode consists of, amongst other things, a deviceId and an inode pointer. The deviceId effectively points to a device special file within the /dev directory and the inode pointer points to a block on that device.



    Your network location of 10.0.1.103 does not and cannot have an deviceId (it's not in /dev) therefore you can't possibly have a symlink to a network location.



    On the other hand, a mounted network share will have a deviceId which is why you can create a symlink to a mounted location.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 21 '14 at 10:17









    garethTheRed

    23.6k35978




    23.6k35978







    • 1




      Not the answer I wanted, but honest and clear, cheers.
      – speedyrazor
      Jul 21 '14 at 11:29






    • 1




      That is not how symlinks work.
      – Michael Homer
      Mar 1 '17 at 21:37










    • @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
      – stek29
      Mar 12 at 21:01












    • 1




      Not the answer I wanted, but honest and clear, cheers.
      – speedyrazor
      Jul 21 '14 at 11:29






    • 1




      That is not how symlinks work.
      – Michael Homer
      Mar 1 '17 at 21:37










    • @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
      – stek29
      Mar 12 at 21:01







    1




    1




    Not the answer I wanted, but honest and clear, cheers.
    – speedyrazor
    Jul 21 '14 at 11:29




    Not the answer I wanted, but honest and clear, cheers.
    – speedyrazor
    Jul 21 '14 at 11:29




    1




    1




    That is not how symlinks work.
    – Michael Homer
    Mar 1 '17 at 21:37




    That is not how symlinks work.
    – Michael Homer
    Mar 1 '17 at 21:37












    @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
    – stek29
    Mar 12 at 21:01




    @MichaelHomer +1 For correct explanation of symbolic links see stackoverflow.com/questions/16912997
    – stek29
    Mar 12 at 21:01












    up vote
    6
    down vote













    Windows has a special syntax \MACHINEDIRECTORY…FILE meaning the file located at DIRECTORY…FILE on the machine called \MACHINE over the SMB protocol. This is built into the operating system and specialized to one network protocol.



    Linux has a flexible filesystem based on the notion of mounting. Filesystems are attached to an existing directory, and the administrator gets to choose how to arrange the directory hierarchy. For more background, read What is meant by mounting a device in Linux?, Why is Linux's filesystem designed as a single directory tree? and What mount points exist on a typical Linux system?. Linux supports many network filesystems (i.e. filesystems that allow one machine to access files on another machine), including NFS, SMB, SSHFS, etc.



    NFS can be considered Linux's native network filesystem, the way SMB is Windows's. However Linux doesn't export its files by default: you need to install an NFS server. An NFS server is available in all Linux distributions, but requires a bit of setup (you need to register the directories you want to export in the file /etc/exports). Furthermore NFS is from a gentler time when attackers on the local network weren't a concern, and securing it requires a bit of knowledge about firewalls which is beyond the scope of this answer. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory), assuming that it is exported by the remote machine, run the following command as root:



    mount foo.example.com:/some/where /local/dir


    The easy way to access remote files with next to no setup is over SSHFS. All you need is to install an SSH server on the remote machine, and the sshfs package on the local machine. You should also generate a key (see How to make password-less login work), though you don't have to do it if you don't mind entering your password each time. SSH is additionally useful to run commands on the remote machine. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory) over SSHFS, run the following command (as your usual user):



    sshfs foo.example.com:/some/where /local/dir


    Linux can be a server or a client for the SMB protocol (communicating with Windows machines, or even with other Linux machines though it's less well integrated than other protocols) through the Samba software.



    You can set up an automounter (such as autofs) so that accessing certain directories automatically mounts directories from some remote machine. For example, a common configuration arranges that the autofs filesystem is mounted on the directory /net, and accessing /net/MACHINE/DIRECTORY causes the remote directory /DIRECTORY from /net/MACHINE to be mounted over NFS at that location (and it will be unmounted after a certain period of inactivity). The remote machine must of course have an NFS server set up and allowing that connection.



    It is possible to set up an automounter with SSHFS. See Totally Seamless SSHFS under Linux using Fuse and Autofs and Autofs and sshfs – the perfect couple for quick tutorials; in a nutshell:



    1. Install autofs and sshfs.


    2. Add the following line to /etc/auto.master:



      /mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost


      Replace the two occurrences of 1000 by your user id and group id (run id -u and id -g to show these values). Create the directory /mnt/sshfs.




    3. Create a file /etc/auto.sshfs containing lines like the following:



      machinename -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#machinename.example.com:


      where machinename.example.com is the host name (or IP address) of the remote machine and machinename is the name you want to access it as locally, via the path /mnt/sshfs/machinename.



    Autosshfs provides a more convenient autofs+sshfs setup.



    Finally, regarding the symbolic part: you can create a symbolic link to a non-existent path. The symbolic link is the second argument, so you'll need something like



    ln -s /net/10.0.1.103/sharedFolder/symlinkFile.mov /link/to/local/file.mov


    You'll need to manually or automatically arrange for /sharedFolder from 10.0.1.103 to be mounted at /net/10.0.1.103/sharedFolder.






    share|improve this answer


























      up vote
      6
      down vote













      Windows has a special syntax \MACHINEDIRECTORY…FILE meaning the file located at DIRECTORY…FILE on the machine called \MACHINE over the SMB protocol. This is built into the operating system and specialized to one network protocol.



      Linux has a flexible filesystem based on the notion of mounting. Filesystems are attached to an existing directory, and the administrator gets to choose how to arrange the directory hierarchy. For more background, read What is meant by mounting a device in Linux?, Why is Linux's filesystem designed as a single directory tree? and What mount points exist on a typical Linux system?. Linux supports many network filesystems (i.e. filesystems that allow one machine to access files on another machine), including NFS, SMB, SSHFS, etc.



      NFS can be considered Linux's native network filesystem, the way SMB is Windows's. However Linux doesn't export its files by default: you need to install an NFS server. An NFS server is available in all Linux distributions, but requires a bit of setup (you need to register the directories you want to export in the file /etc/exports). Furthermore NFS is from a gentler time when attackers on the local network weren't a concern, and securing it requires a bit of knowledge about firewalls which is beyond the scope of this answer. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory), assuming that it is exported by the remote machine, run the following command as root:



      mount foo.example.com:/some/where /local/dir


      The easy way to access remote files with next to no setup is over SSHFS. All you need is to install an SSH server on the remote machine, and the sshfs package on the local machine. You should also generate a key (see How to make password-less login work), though you don't have to do it if you don't mind entering your password each time. SSH is additionally useful to run commands on the remote machine. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory) over SSHFS, run the following command (as your usual user):



      sshfs foo.example.com:/some/where /local/dir


      Linux can be a server or a client for the SMB protocol (communicating with Windows machines, or even with other Linux machines though it's less well integrated than other protocols) through the Samba software.



      You can set up an automounter (such as autofs) so that accessing certain directories automatically mounts directories from some remote machine. For example, a common configuration arranges that the autofs filesystem is mounted on the directory /net, and accessing /net/MACHINE/DIRECTORY causes the remote directory /DIRECTORY from /net/MACHINE to be mounted over NFS at that location (and it will be unmounted after a certain period of inactivity). The remote machine must of course have an NFS server set up and allowing that connection.



      It is possible to set up an automounter with SSHFS. See Totally Seamless SSHFS under Linux using Fuse and Autofs and Autofs and sshfs – the perfect couple for quick tutorials; in a nutshell:



      1. Install autofs and sshfs.


      2. Add the following line to /etc/auto.master:



        /mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost


        Replace the two occurrences of 1000 by your user id and group id (run id -u and id -g to show these values). Create the directory /mnt/sshfs.




      3. Create a file /etc/auto.sshfs containing lines like the following:



        machinename -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#machinename.example.com:


        where machinename.example.com is the host name (or IP address) of the remote machine and machinename is the name you want to access it as locally, via the path /mnt/sshfs/machinename.



      Autosshfs provides a more convenient autofs+sshfs setup.



      Finally, regarding the symbolic part: you can create a symbolic link to a non-existent path. The symbolic link is the second argument, so you'll need something like



      ln -s /net/10.0.1.103/sharedFolder/symlinkFile.mov /link/to/local/file.mov


      You'll need to manually or automatically arrange for /sharedFolder from 10.0.1.103 to be mounted at /net/10.0.1.103/sharedFolder.






      share|improve this answer
























        up vote
        6
        down vote










        up vote
        6
        down vote









        Windows has a special syntax \MACHINEDIRECTORY…FILE meaning the file located at DIRECTORY…FILE on the machine called \MACHINE over the SMB protocol. This is built into the operating system and specialized to one network protocol.



        Linux has a flexible filesystem based on the notion of mounting. Filesystems are attached to an existing directory, and the administrator gets to choose how to arrange the directory hierarchy. For more background, read What is meant by mounting a device in Linux?, Why is Linux's filesystem designed as a single directory tree? and What mount points exist on a typical Linux system?. Linux supports many network filesystems (i.e. filesystems that allow one machine to access files on another machine), including NFS, SMB, SSHFS, etc.



        NFS can be considered Linux's native network filesystem, the way SMB is Windows's. However Linux doesn't export its files by default: you need to install an NFS server. An NFS server is available in all Linux distributions, but requires a bit of setup (you need to register the directories you want to export in the file /etc/exports). Furthermore NFS is from a gentler time when attackers on the local network weren't a concern, and securing it requires a bit of knowledge about firewalls which is beyond the scope of this answer. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory), assuming that it is exported by the remote machine, run the following command as root:



        mount foo.example.com:/some/where /local/dir


        The easy way to access remote files with next to no setup is over SSHFS. All you need is to install an SSH server on the remote machine, and the sshfs package on the local machine. You should also generate a key (see How to make password-less login work), though you don't have to do it if you don't mind entering your password each time. SSH is additionally useful to run commands on the remote machine. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory) over SSHFS, run the following command (as your usual user):



        sshfs foo.example.com:/some/where /local/dir


        Linux can be a server or a client for the SMB protocol (communicating with Windows machines, or even with other Linux machines though it's less well integrated than other protocols) through the Samba software.



        You can set up an automounter (such as autofs) so that accessing certain directories automatically mounts directories from some remote machine. For example, a common configuration arranges that the autofs filesystem is mounted on the directory /net, and accessing /net/MACHINE/DIRECTORY causes the remote directory /DIRECTORY from /net/MACHINE to be mounted over NFS at that location (and it will be unmounted after a certain period of inactivity). The remote machine must of course have an NFS server set up and allowing that connection.



        It is possible to set up an automounter with SSHFS. See Totally Seamless SSHFS under Linux using Fuse and Autofs and Autofs and sshfs – the perfect couple for quick tutorials; in a nutshell:



        1. Install autofs and sshfs.


        2. Add the following line to /etc/auto.master:



          /mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost


          Replace the two occurrences of 1000 by your user id and group id (run id -u and id -g to show these values). Create the directory /mnt/sshfs.




        3. Create a file /etc/auto.sshfs containing lines like the following:



          machinename -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#machinename.example.com:


          where machinename.example.com is the host name (or IP address) of the remote machine and machinename is the name you want to access it as locally, via the path /mnt/sshfs/machinename.



        Autosshfs provides a more convenient autofs+sshfs setup.



        Finally, regarding the symbolic part: you can create a symbolic link to a non-existent path. The symbolic link is the second argument, so you'll need something like



        ln -s /net/10.0.1.103/sharedFolder/symlinkFile.mov /link/to/local/file.mov


        You'll need to manually or automatically arrange for /sharedFolder from 10.0.1.103 to be mounted at /net/10.0.1.103/sharedFolder.






        share|improve this answer














        Windows has a special syntax \MACHINEDIRECTORY…FILE meaning the file located at DIRECTORY…FILE on the machine called \MACHINE over the SMB protocol. This is built into the operating system and specialized to one network protocol.



        Linux has a flexible filesystem based on the notion of mounting. Filesystems are attached to an existing directory, and the administrator gets to choose how to arrange the directory hierarchy. For more background, read What is meant by mounting a device in Linux?, Why is Linux's filesystem designed as a single directory tree? and What mount points exist on a typical Linux system?. Linux supports many network filesystems (i.e. filesystems that allow one machine to access files on another machine), including NFS, SMB, SSHFS, etc.



        NFS can be considered Linux's native network filesystem, the way SMB is Windows's. However Linux doesn't export its files by default: you need to install an NFS server. An NFS server is available in all Linux distributions, but requires a bit of setup (you need to register the directories you want to export in the file /etc/exports). Furthermore NFS is from a gentler time when attackers on the local network weren't a concern, and securing it requires a bit of knowledge about firewalls which is beyond the scope of this answer. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory), assuming that it is exported by the remote machine, run the following command as root:



        mount foo.example.com:/some/where /local/dir


        The easy way to access remote files with next to no setup is over SSHFS. All you need is to install an SSH server on the remote machine, and the sshfs package on the local machine. You should also generate a key (see How to make password-less login work), though you don't have to do it if you don't mind entering your password each time. SSH is additionally useful to run commands on the remote machine. To make the directory /some/where from the remote machine foo.example.com available at the location /local/dir (which must be an existing directory) over SSHFS, run the following command (as your usual user):



        sshfs foo.example.com:/some/where /local/dir


        Linux can be a server or a client for the SMB protocol (communicating with Windows machines, or even with other Linux machines though it's less well integrated than other protocols) through the Samba software.



        You can set up an automounter (such as autofs) so that accessing certain directories automatically mounts directories from some remote machine. For example, a common configuration arranges that the autofs filesystem is mounted on the directory /net, and accessing /net/MACHINE/DIRECTORY causes the remote directory /DIRECTORY from /net/MACHINE to be mounted over NFS at that location (and it will be unmounted after a certain period of inactivity). The remote machine must of course have an NFS server set up and allowing that connection.



        It is possible to set up an automounter with SSHFS. See Totally Seamless SSHFS under Linux using Fuse and Autofs and Autofs and sshfs – the perfect couple for quick tutorials; in a nutshell:



        1. Install autofs and sshfs.


        2. Add the following line to /etc/auto.master:



          /mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost


          Replace the two occurrences of 1000 by your user id and group id (run id -u and id -g to show these values). Create the directory /mnt/sshfs.




        3. Create a file /etc/auto.sshfs containing lines like the following:



          machinename -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#machinename.example.com:


          where machinename.example.com is the host name (or IP address) of the remote machine and machinename is the name you want to access it as locally, via the path /mnt/sshfs/machinename.



        Autosshfs provides a more convenient autofs+sshfs setup.



        Finally, regarding the symbolic part: you can create a symbolic link to a non-existent path. The symbolic link is the second argument, so you'll need something like



        ln -s /net/10.0.1.103/sharedFolder/symlinkFile.mov /link/to/local/file.mov


        You'll need to manually or automatically arrange for /sharedFolder from 10.0.1.103 to be mounted at /net/10.0.1.103/sharedFolder.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:36









        Community

        1




        1










        answered Jul 22 '14 at 1:12









        Gilles

        519k12410371566




        519k12410371566




















            up vote
            0
            down vote













            For what it's worth ...



            I have worked on a small tool called lionfs which is based on Raphael S. Carvalho's GhostFS. The goal is to allow symbolic links pointing to an URI. It is fairly incomplete, have a lot of issues, and currently supports only HTTP. FUSE (Filesystem in Userspace) is used to handle the background.






            share|improve this answer


















            • 1




              Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
              – phk
              Oct 26 '16 at 19:07














            up vote
            0
            down vote













            For what it's worth ...



            I have worked on a small tool called lionfs which is based on Raphael S. Carvalho's GhostFS. The goal is to allow symbolic links pointing to an URI. It is fairly incomplete, have a lot of issues, and currently supports only HTTP. FUSE (Filesystem in Userspace) is used to handle the background.






            share|improve this answer


















            • 1




              Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
              – phk
              Oct 26 '16 at 19:07












            up vote
            0
            down vote










            up vote
            0
            down vote









            For what it's worth ...



            I have worked on a small tool called lionfs which is based on Raphael S. Carvalho's GhostFS. The goal is to allow symbolic links pointing to an URI. It is fairly incomplete, have a lot of issues, and currently supports only HTTP. FUSE (Filesystem in Userspace) is used to handle the background.






            share|improve this answer














            For what it's worth ...



            I have worked on a small tool called lionfs which is based on Raphael S. Carvalho's GhostFS. The goal is to allow symbolic links pointing to an URI. It is fairly incomplete, have a lot of issues, and currently supports only HTTP. FUSE (Filesystem in Userspace) is used to handle the background.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 3 hours ago

























            answered Oct 26 '16 at 18:39









            Ricardo Biehl Pasquali

            1125




            1125







            • 1




              Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
              – phk
              Oct 26 '16 at 19:07












            • 1




              Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
              – phk
              Oct 26 '16 at 19:07







            1




            1




            Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
            – phk
            Oct 26 '16 at 19:07




            Please be more specific of what it does and how it helps OP, at first I thought it might to automagic mounting but apparently this is not the case, it's just for offering HTTP served content as a FS?! This does not seem what OP wanted.
            – phk
            Oct 26 '16 at 19:07

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f145636%2fsymlink-from-one-workstation-to-another-without-mount%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)