If you have an up and running Nginx server on your device and want to stop it, lets see some of the ways you can stop it,
- Using systemctl command:
# systemctl stop nginx
# sudo systemctl stop nginx
- Using service command:
# service stop nginx * Stopping nginx nginx [OK]
# sudo service stop nginx
- Using nginx stop command:
# nginx -s stopx
# sudo service nginx -s stop
Note if the service is already stopped, you would see the below message, else the command will return to the prompt.
# nginx -s stop nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

- How to Display content of a file in Terminal Screen?
- How to Install CVS Version Control on Linux/Ubuntu
- How to install and Configure sar sysstat tools in Ubuntu Linux
- ls command to list only directories
- [Ubuntu] Search a package and versions using apt command
- zsh hello world example
- Linux Remove or Delete Files and Directories using Terminal Commands
- How to tar.gz a directory or folder Command
- Calculate days between dates using dateutils ddiff command
- How to ls command to output one entry per line [macOS/Linux/Bash]
- 3 Commands to stop Nginx Server
- Create and write file in single Linux/macOS command
- SCP Copy all files from directory to Local Folder
- How to go to the End of File in Nano Editor
- How to remove/delete a directory in Linux/macOs
- How to Copy Entire Directory to another Directory in Linux
- Execute .bin and .run file Ubuntu Linux
- The Date Command and its usage [Linux - Unix - macOS]
- Fix - ssh-copy-id no identities found error
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to Select All text in vim/vi editor using Keyboard
- Linux: Create a New User and Password and Login Example
- Command to display epoch time Terminal
- How to install curl on Alpine Linux
- How to exit from nano command
- Installing Google Cloud macOS SDK - Google
- How to read int value using Scanner Class Java - Java
- SQL: Check if table exists - HowTos
- [fix] Docker - no matching manifest for linux/arm64/v8 in the manifest list entries [M/M2 Mac] - Docker
- SharePoint Managed Metadata Hidden Taxonomy List - TaxonomyHiddenList - SharePoint
- HTML5 HELLO WORLD Example - Html
- iPhone Message: A new iOS update is now available. Please update from the iOS 14 beta. - Apple
- How to add Back Button on Toolbar in Android [Tutorial] - Android