Questions & Answers
21
votes
1
answers
79
views
How to change hostname on Linux
I need to change my server hostname. What is the correct way to do this on modern Linux systems?
15
votes
1
answers
1395
views
How to compress and extract tar.gz files on Linux
How do I create and extract .tar.gz archives on Linux from the command line?
16
votes
1
answers
1446
views
How to fix "too many open files" error on Linux
My application crashes with "too many open files" error. How can I increase the file descriptor limit?
0
votes
1
answers
639
views
How to set up UFW firewall on Ubuntu
I want to secure my Ubuntu server with a firewall. How do I configure UFW to allow only SSH and HTTP/HTTPS?
1
votes
1
answers
1759
views
How to schedule tasks with cron on Linux
I need to run a backup script every night at 2 AM. How do I set up a cron job?
8
votes
1
answers
1534
views
How to monitor system resources in real-time on Linux
What are the best tools to monitor CPU, memory, and disk usage in real-time on a Linux server?
36
votes
1
answers
760
views
How to add swap space on Linux
My server is running out of memory. How can I add swap space without reinstalling the system?
17
votes
1
answers
844
views
How to set up automatic security updates on Ubuntu
I want my Ubuntu server to automatically install security updates. How do I configure unattended-upgrades?
7
votes
1
answers
1213
views
How to check disk usage and find large files on Linux
My server disk is getting full. How can I find which files and directories are taking up the most space?
14
votes
1
answers
1545
views
How to find and kill a process using a specific port
I need to free up port 8000 but something is already using it. How can I find what process is using it and kill it?
39
votes
1
answers
1733
views
CORS errors in Django REST API - complete fix
I'm getting CORS errors when my frontend tries to access my Django REST API. "Access-Control-Allow-Origin" header is missing.
22
votes
1
answers
74
views
How to optimize Django ORM queries for better performance
My Django application is slow. Database queries are taking forever. How can I optimize my ORM queries?
43
votes
1
answers
1517
views
PostgreSQL connection refused in Django - solutions
My Django app cannot connect to PostgreSQL. I get "connection refused" error. PostgreSQL is installed and running.
1
votes
1
answers
775
views
502 Bad Gateway with Nginx and Gunicorn - how to fix
I'm getting 502 Bad Gateway error when accessing my Django site through Nginx. Gunicorn seems to be running. How do I fix this?
40
votes
1
answers
1638
views
Django migrations not applying - troubleshooting guide
I made changes to my models but migrations are not being applied. makemigrations shows "No changes detected". What's wrong?
9
votes
1
answers
626
views
pip install failing with SSL certificate error
When I try pip install, I get SSL: CERTIFICATE_VERIFY_FAILED error. How can I fix this?
44
votes
1
answers
1622
views
How to handle Unicode encoding errors in Python
I'm getting UnicodeDecodeError when reading files or processing text. How do I properly handle encoding in Python?
12
votes
1
answers
360
views
Python virtual environment not activating - solutions
When I try to activate my virtual environment with "source venv/bin/activate", nothing happens. No error, but the prompt doesn't change.
45
votes
1
answers
1866
views
How to fix ModuleNotFoundError: No module named in Python
I installed a package with pip but Python says "ModuleNotFoundError: No module named". I've tried reinstalling but it still doesn't work.
8
votes
1
answers
1207
views
How to fix broken package dependencies on Ubuntu
I'm getting "unmet dependencies" error when trying to install packages with apt. apt install -f doesn't work. How to fix this?