% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={ubuntu-auto-mount-nfs-using-autofs},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{ubuntu-auto-mount-nfs-using-autofs}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{ubuntu-auto-mount-nfs-using-autofs}{%
\section{ubuntu-auto-mount-nfs-using-autofs}\label{ubuntu-auto-mount-nfs-using-autofs}}

\hypertarget{how-to-configure-autofs-to-mount-an-nfs-filesystem}{%
\section{How to configure autofs to mount an NFS
filesystem}\label{how-to-configure-autofs-to-mount-an-nfs-filesystem}}

Install the needed packages:

.. code-block:: bash

sudo apt-get install autofs nfs-client:

Enable auto-mount to search network

.. code-block:: bash

sudo vim /etc/auto.master

Un-comment the \emph{/net} line:

.. code-block:: bash

\#/net -hosts /net -hosts

Restart autofs:

.. code-block:: bash

sudo service autofs restart

Test:

.. code-block:: bash

cd /net/{[}nfs server hostname{]} cd /net/guile.foxhop.net

Success!

Now I would suggest creating a link in your home directory.

This is how I made the link:

.. code-block:: bash

ln -s /net/guile.foxhop.net/mnt/mirror /home/fox/mirror

\hypertarget{temporary-nfs-mount}{%
\section{temporary NFS mount}\label{temporary-nfs-mount}}

.. code-block:: bash

\# as root apt-get install nfs-common mkdir /mnt/temp-mount/ mount -o
soft,intr,rsize=8192,wsize=8192 server:/data/NbClient /mnt/temp-mount/

\# when finished, clean up mount umount /mnt/temp-mount/

\end{document}
