# Linux Basic web server command

It looks like you've provided a sequence of commands and explanations from your terminal session.

1. `sudo ufw status`
    
    * Checks the status of the Uncomplicated Firewall (UFW), displaying current rules and whether it is active or not.
        
    
    ```plaintext
    sudo ufw status
    ```
    
2. `sudo ufw allow ssh`
    
    * Allows incoming SSH connections through the firewall, enabling secure remote access to the system.
        
        ```plaintext
        sudo ufw allow ssh
        ```
        
3. `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.
        
        ```plaintext
        sudo ufw allow 'Nginx Full'
        ```
        
4. `sudo ufw enable`
    
    * Enables the UFW firewall, activating the rules you've configured to regulate incoming and outgoing network traffic.
        
        ```plaintext
        sudo ufw enable
        ```
        
5. `sudo ufw status`
    
    * Verifies the firewall's status post-enabling, confirming which ports and services are allowed or denied.
        
        ```plaintext
        sudo ufw status
        ```
        
6. `sudo systemctl stop nginx`
    
    * Stops the Nginx web server, halting its operation.
        
        ```plaintext
         sudo systemctl stop nginx
        ```
        
7. `sudo systemctl start nginx`
    
    * Starts the Nginx web server, initiating its operation.
        
        ```plaintext
        sudo systemctl start nginx
        ```
        
8. `sudo systemctl restart nginx`
    
    * Restarts the Nginx web server, applying any configuration changes or updates.
        
        ```plaintext
        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.
        
        ```plaintext
        sudo systemctl status nginx
        ```
        
    
    `sudo systemctl enable nginx`
    
    * Configures Nginx to start automatically when the system boots up, ensuring it runs as a service.
        
        ```plaintext
        sudo systemctl enable nginx
        ```
        
    
    `ls`
    
    * Lists the files and directories in the current directory.
        
        ```plaintext
        ls
        ```
        
    
    `ls -lrp`
    
    * Lists files and directories in long format, showing details such as permissions, ownership, and file types, and appends `/` to directories.
        
    * ```plaintext
        ls -lrp
        ```
        
    * `cd /var/www/html`
        
    * Changes the current directory to `/var/www/html`, typically where web files for Nginx or Apache are stored.
        
    * ```plaintext
        cd /var/www/html
        ```
        
    
    `pwd`
    
    * Prints the current working directory.
        
        ```plaintext
        pwd
        ```
        
    
    `echo "helloworld"`
    
    * Prints "helloworld" to the terminal output.
        
        ```plaintext
        echo "helloworld"
        ```
        
    
    `touch index.html`
    
    * Creates an empty file named `index.html` in the current directory.
        
        ```plaintext
        touch index.html
        ```
        
    
    `sudo touch index.html`
    
    * Attempts to create an empty file named `index.html` with superuser privileges, but may fail due to permissions.
        
        ```plaintext
        sudo touch index.html
        ```
        
    
    `sudo echo "Helloworld" > index.html`
    
    * Writes "Helloworld" into the `index.html` file using elevated privileges, overwriting its content if the file exists.
        
        ```plaintext
        sudo echo "Helloworld" > index.html
        ```
        
    
    `sudo vi index.html`
    
    * Opens the `index.html` file in the Vi text editor with superuser privileges, allowing editing of its contents.
        
        ```plaintext
        sudo vi index.html
        ```
        
    
    `sudo rm index.html`
    
    * Removes (deletes) the `index.html` file from the current directory with superuser permissions.
        
        ```plaintext
        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.
