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

ADVERTISEMENTS

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.

This entry is 4 of 15 in the Linux / UNIX NFS File Server Tutorial series. Keep reading the rest of the series:
  1. CentOS / Redhat: Setup NFS v4.0 File Server
  2. Debian / Ubuntu Linux: Setup NFSv4 File Server
  3. Mac Os X: Mount NFS Share / Set an NFS Client
  4. RHEL: How Do I Start and Stop NFS Service?
  5. How To Restart Linux NFS Server Properly When Network Become Unavailable
  6. Linux Iptables Allow NFS Clients to Access the NFS Server
  7. Debian / Ubuntu Linux Disable / Remove All NFS Services
  8. Linux: Tune NFS Performance
  9. Mount NFS file system over a slow and busy network
  10. Linux Track NFS Directory / Disk I/O Stats
  11. Linux Disable / Remove All NFS Services
  12. Linux: NFS4 mount Error reason given by server: No such file or directory
  13. Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
  14. CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access
  15. Increase NFS Client Mount Point Security
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 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 VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
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.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.