Linux Maintenance Tips
When using Linux, it's essential to keep your system updated:
sudo apt update
sudo apt upgrade
Creating Python Virtual env
Create , Activate , Deactivate
virtualenv env
source env/bin/activate
deactivate
Enable https on the domain
Install Certbot
sudo apt install -y certbot python3-certbot-nginx
Install Certificate on Nginx ( Perform this step every time a new domain is added with Nginx )
sudo certbot --nginx -d your_domain -d www.your_domain
Verify the Accessibility
https://your_domain
Test Auto-Renewal
sudo certbot renew --dry-run
If the above command doesn't throw an error, it means your SSL certificate
will be renewed automatically without any issues.
Here are some fundamental Linux commands for navigation and file management
Creates a new directory (Folder)
mkdir ProjectFolderName
Changes directory to ProjectFolderName'cd ..' to go back one directory.
cd ProjectFolderName
To go back one directory.
cd ..
Check Current Directory.
pwd
Removes the directory ProjectFolderName and all its contents (use with caution).
sudo rm -rf ProjectFolderName