
Follow ZDNET: Add us as a preferred source on Google.
ZDNET’s key takeaways
- AI has its place in the world of Linux.
- If you’re new or über busy, AI can be a big help.
- Employ AI in one of these areas to ease your burden.
I’m not a big fan of employing AI for everything. I strongly believe that it should have no place in creative endeavors (with some exceptions — such as DaVinci Resolve’s incredible AI voice isolation), but it does make sense to employ AI in certain areas.
For example: Linux system management.
Before anyone gets up in arms, I’m not saying that system administrators should be replaced by machines. What I am saying is that AI can help those who are new to Linux learn how to manage (or better manage) their systems. And in cases where a single admin has to manage more machines than they have time for, AI can make for a great assistant.
But in what areas?
I’ve cobbled together seven uses where AI could really make a difference for those who are either very busy or who are just now learning the ins and outs of Linux.
1. Bash scripts
Although bash scripts aren’t a necessity for basic desktop Linux use, anyone who’s ever managed a Linux server or wanted to simply create a custom backup task for their desktops, bash scripts are essential.
For those who are just learning Linux, these scripts can be daunting, which is where AI can be handy. Using AI, you could type a prompt like, “Create a Linux bash script that backs up my ~/Documents directory to an external drive mounted at /backups on a daily basis and retains only the most recent five backups.”
Also: 5 factors steadily fueling Linux’s desktop rise
Your AI will create the bash script for you, which you can then test. If it works, cron that baby (another instance where you might need to use AI), and trust that your backups are going to be successful. Do make sure to check that they are not only working, but that the backups contain the files you want backed up. Because… you never know.
2. Parsing log files
Log files are key to understanding what’s going on with your system or what’s happened to your system. Most Linux log files are contained within /var/log, and some of them can be a bit challenging to understand. Here’s a good example. I recently ran into a syslog entry that I’d never seen before. Each entry contained “cause font doesn’t have a family name.” I did some DuckDuckGo’ing and found nothing. I then opened Opera’s Aria and queried it about the error. Turns out the error relates to font handling or rendering, and that the fonts in question do not have an essential attribute (in this case, a family name). Clearly, that’s not an error I need to worry about, so I decided to suppress those errors by creating a blacklist file in /etc/rsyslog.d/ with the contents:
:msg, contains, “cause font doesn’t have a family name” stop
I then restarted rsyslog with:
sudo systemctl restart rsyslog
Also: 5 surprisingly productive things you can do with the Linux terminal
The error was no more.
3. Understanding journalctrl output
Systemd can be a bit confusing at times, especially when it comes to errors. When you wind up with errors, you’ll be pointed to the journalctl tool, which can contain some really cryptic output. Most of the time, I can understand what it’s saying, but every so often, the journalctl output makes me go, “Huh?” When that happens, AI can be of assistance.
Keep in mind that you shouldn’t just tell AI, “What does this output mean?” You should also include the app or service you are troubleshooting, as in, “What does this openssh-server journalctl output mean XXX” (where XXX is the actual journalctl output.
AI is pretty good at helping you understand what you’re looking at.
4. Generating iptables firewall rules
Iptables is the foundation for all Linux firewalls, and man, can it be complex. It’s not often you have to bother with iptables, because you’d mostly be interacting with simpler counterparts, such as UFW. But if there is an occasion where you have to use iptables, you’ll very quickly realize how complicated it is.
Also: The first 5 Linux commands every new user should learn
I remember the first time I had to use iptables (back in the late 1990s), and I thought, “I’m never going to understand this!” Had I had AI to help me unravel the complexity of iptables, things would have been as easy as querying:
Write an IPtables rule to allow SSH connections in through port 2022 on the Ethernet device eth0.
Yeah, that’s so much easier.
5. Process monitoring
Although there are plenty of tools to help you monitor your Linux processes (especially some of the amazing and user-friendly GUIs), you might run into the rare occasion that you have to figure it out with nothing more than the command line. If you understand the ps command, you should be good to go; otherwise, consider querying your favorite AI:
How do I find out which process on a Linux system is using the most system resources, and how do I stop it?
The answer should get you started on your journey of keeping Linux system processes in check.
6. Managing user accounts and permissions
What if you needed to lock a user out of their account on a Linux system that includes agentic AI? You could always query:
Lock Mary out of her account for one week.
If the AI is configured with the proper permissions, you’ll most likely be asked to type your sudo password so the process can continue. After typing your sudo password, most likely your AI is going to run the command:
sudo chage -E $(date -d “+7 days” +%Y-%m-%d) Mary
Also: The best Linux distros for beginners
Because file/folder permissions can be a bit complicated to learn, you might use AI to help you out. This is especially easy on a system that includes agentic AI. With that, you could do something like:
Change the folder ownership and permissions of /data such that the group editors have full access to it.
7. Virtualization
Although you may never have to deal with virtual machines, there may come a time when you want to run a virtual machine in the background, so you have access to a particular server on your LAN, without having to have a GUI running 24/7.
For example, you might have a virtual machine that runs Nextcloud to serve as your in-home solution for Google Workspace. Instead of running the VirtualBox GUI and then having the server GUI up and running (both GUIs take up valuable system resources), you could run it headless (which means without a GUI) so you can still access it from anywhere on your LAN.
To that end, you could query:
How do I run a headless instance of a VirtualBox virtual machine named Nextcloud?
You’ll probably see the following in the output:
VBoxManage startvm “Nextcloud” –type headless
There are plenty of other ways you can use AI to help with Linux system management, and the above will easily get you started on that journey.
