Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
Just finished a new ubuntu-mate install and have my nvidia drivers working.
What are some good 'maintenance' practices to follow?
Any special commands to know?
Since this is my 3rd attempt at getting things working properly (after also failing miserably with a CentOS7 install) I want to be as careful as possible about keeping things working (no failed boots, display glitches, random crashes, etc)
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521
Rep:
I use deborphan periodically like so:
Code:
$ deborphan | xargs sudo dpkg --purge $1
which rids the system of unnecessary programs. Apt-clean is also good to do periodically. Bleachbit gets rid of unnecessary files connected to a large number of programs. Fslint to find empty directories, duplicate files, broken links. Clamav to find malware.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521
Rep:
When I think of it . . .
Quote:
Originally Posted by eco_bach
AwesomeMachine
great tips. When you say 'periodically' does that mean daily, monthly,?
I'll usually notice something wrong, like a weird error, or excessive space used on a disk. /var/cache/apt/archives can get pretty full. Mine is 1.7 GB right now. So, when I'm done writing this I'll run apt-clean to get rid of the old package files.
Some users like to keep the old files, but I maintain a local mirror.
Other times I'm just cleaning up redundant files, which can really take quite a bit of disk space. So, there's no hard ands fast schedule for cleanup. But once a month is great plenty.
It doesn't pay to be "too" neat and tidy. Also, be careful with apt-get autoremove, because it sometimes makes serious mistakes. Read through what it is removing. I don't use autoremove.
Last edited by AwesomeMachine; 12-10-2016 at 08:25 PM.
Reason: addition
Keep your system updated (check updates every week or so).
Configure your iptables firewall to close any unnecessary outgoing ports (I recommend gufw as nice GUI interface to iptables). (ALso close unnecessary outgoing ports in your router.)
I second c0wb0y's advice. Learn how to use apt-get. Crucial commands are
Code:
sudo apt-get update && sudo apt-get upgrade <--you can run these as two separate commands, but running them together is more efficient
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get dist-upgrade
See man apt-get for more.
If you really want to get down to Linux basics, give root a password and use su instead of sudo. The sudo fetish is very much a *buntu thing and I have yet to see a reasonable rationale for it.
Learn how to use rsync to back up your data to external media. If it's not on external media, it's not a backup; it's a replication.
Learn how to use man pages and, especially, the apropos command to find relevant man pages.
Learn how to use grep to filter search results on the command line. For example
Code:
$ ps -A | grep smb <--filtering for results relevant to the Samba file-sharing daemon
1714 ? 00:00:00 smbd
1716 ? 00:00:00 smbd-notifyd
Just a few thoughts.
Afterthought:
Something you don't have to concern yourself with: Defragmentation. Linux file systems manage defragmentation on their own.
You generally do not have to run an AV program, but you do need to practice safe browsing habits and beware of social engineering snares. (Just for kicks, I once clicked on one of those "scan your drive" web links. The scan started. It was faster than any real scan could have been and it told me it was scanning my C:\ drive. I was using Linux. I didn't have a C:\ drive.) "Social engineering" is platform independent.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.