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)

More Posts related to Linux,
- Terminal display next month Calendar
- How to change bash terminal prompt string and color
- How to exit from nano command
- How to Display content of a file in Terminal Screen?
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- 3 Commands to stop Nginx Server
- How to check file permissions for your file using Linux/Unix/macOS Terminal Command
- Create Hidden File or Directory using Shell Command
- bash: cls: command not found
- How to install python pip on Ubuntu using apt command
- The Date Command and its usage [Linux - Unix - macOS]
- SCP Copy all files from directory to Local Folder
- Create and write file in single Linux/macOS command
- Install OpenSSL on Linux/Ubuntu
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Check SSH/OpenSSH version Command
- Execute .bin and .run file Ubuntu Linux
- What does apt-get update command does?
- How to ls command to output one entry per line [macOS/Linux/Bash]
- 3 ways to clear screen on Linux Terminal
- How to backup a file in Linux/Unix
- How to quit or exit SFTP Prompt on Terminal
- How to use SCP Command to Copy Directory
- zsh hello world example
- How to remove/delete a directory in Linux/macOs
More Posts:
- Set Title to Android AlertDialog - Android
- Mac OS X Error: Could not create the Java Virtual Machine - Mac-OS-X
- Writing your first Hello, World! 🌍 JavaScript code Tutorial - JavaScript
- Comments in Python Programming - Python
- Get count of SharePoint List or Document Library Items using PowerShell - SharePoint
- [Fix] java.net.MalformedURLException: unknown protocol - Java
- Deep Dive: Why avoid java.util.Date and Calendar Classes - Java
- How to find files taking up space on your Mac - MacOS