Redhat / RHEL / CentOS Linux: Start / Stop / Restart NFS Service [ server ]

How do I start and stop the NFS service and/or server using the command prompt? How do I make sure NFS always stars automatically when system boots or restarts under RHEL based systems?

You can use the following commands under RHEL based systems

Start / Stop / Restart portmap Service under RHEL

Type the following commands:
# /etc/init.d/portmap start
# /etc/init.d/portmap stop
# /etc/init.d/portmap restart

Start / Stop / Restart NFS Service under RHEL / CentOS Linux

Type the following commands:
# /etc/init.d/nfs start
# /etc/init.d/nfs stop
# /etc/init.d/nfs restart

Automatically Start the NFS Server

To start the NFS service automatically at the boot time, enter:
# ntsysv
Select Portmap and NFS and save the changes. ntsysv command is a simple interface for configuring runlevel services which are also configurable through chkconfig command.


🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • john piroino Apr 19, 2007 @ 18:21

    what can cause a nfs service to stop or freeze

  • Christian Dreyer Nov 7, 2007 @ 22:19

    IF you’re using the package nfs-kernel-server you have to substitute nfs for nfs-kernel-server instead. So you’d type
    # /etc/init.d/nfs-kernel-server stop
    instead

    cheers

  • the_guv Feb 14, 2010 @ 0:02

    and for Portmap:-

    sudo service portmap restart

    (likely just a Debian thing)

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz