Linux Basic web server command

It looks like you've provided a sequence of commands and explanations from your terminal session.
sudo ufw status- Checks the status of the Uncomplicated Firewall (UFW), displaying current rules and whether it is active or not.
sudo ufw status
sudo ufw allow sshAllows incoming SSH connections through the firewall, enabling secure remote access to the system.
sudo ufw allow ssh
sudo ufw allow 'Nginx Full'Opens up ports necessary for Nginx to operate with its full feature set, typically allowing HTTP (port 80) and HTTPS (port 443) traffic.
sudo ufw allow 'Nginx Full'
sudo ufw enableEnables the UFW firewall, activating the rules you've configured to regulate incoming and outgoing network traffic.
sudo ufw enable
sudo ufw statusVerifies the firewall's status post-enabling, confirming which ports and services are allowed or denied.
sudo ufw status
sudo systemctl stop nginxStops the Nginx web server, halting its operation.
sudo systemctl stop nginx
sudo systemctl start nginxStarts the Nginx web server, initiating its operation.
sudo systemctl start nginx
sudo systemctl restart nginxRestarts the Nginx web server, applying any configuration changes or updates.
sudo systemctl restart nginx
sudo systemctl status nginx
Checks the current status of the Nginx service, confirming if it's running, stopped, or encountering issues.
sudo systemctl status nginx
sudo systemctl enable nginx
Configures Nginx to start automatically when the system boots up, ensuring it runs as a service.
sudo systemctl enable nginx
ls
Lists the files and directories in the current directory.
ls
ls -lrp
Lists files and directories in long format, showing details such as permissions, ownership, and file types, and appends
/to directories.ls -lrpcd /var/www/htmlChanges the current directory to
/var/www/html, typically where web files for Nginx or Apache are stored.cd /var/www/html
pwd
Prints the current working directory.
pwd
echo "helloworld"
Prints "helloworld" to the terminal output.
echo "helloworld"
touch index.html
Creates an empty file named
index.htmlin the current directory.touch index.html
sudo touch index.html
Attempts to create an empty file named
index.htmlwith superuser privileges, but may fail due to permissions.sudo touch index.html
sudo echo "Helloworld" > index.html
Writes "Helloworld" into the
index.htmlfile using elevated privileges, overwriting its content if the file exists.sudo echo "Helloworld" > index.html
sudo vi index.html
Opens the
index.htmlfile in the Vi text editor with superuser privileges, allowing editing of its contents.sudo vi index.html
sudo rm index.html
Removes (deletes) the
index.htmlfile from the current directory with superuser permissions.sudo rm index.html
These commands cover firewall management (ufw), web server control (nginx), file system navigation and manipulation, and basic file operations in a Unix-like environment. Each command serves a specific purpose related to system administration and web development tasks.

