LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-10-2016, 02:35 PM   #1
eco_bach
Member
 
Registered: Dec 2016
Posts: 242

Rep: Reputation: Disabled
Regular maintenance best practices


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)

Thanks for any feedback!
 
Old 12-10-2016, 03:15 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Document it.
Document every thing.

Start with Your installled OS and version:
Code:
lsb_release -dc && uname -r
So, short version, did you download drivers for your card or use the "additional drivers" widget first?

feedback
https://help.ubuntu.com/

Last edited by Habitual; 12-10-2016 at 03:22 PM.
 
Old 12-10-2016, 04:05 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 12-10-2016, 05:43 PM   #4
eco_bach
Member
 
Registered: Dec 2016
Posts: 242

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Document it.
Document every thing.

Start with Your installled OS and version:
Code:
lsb_release -dc && uname -r
So, short version, did you download drivers for your card or use the "additional drivers" widget first?

feedback
https://help.ubuntu.com/

additional drivers window only, but added a 2nd PPA first to get the very latest driver 375.20
http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu
 
Old 12-10-2016, 05:45 PM   #5
eco_bach
Member
 
Registered: Dec 2016
Posts: 242

Original Poster
Rep: Reputation: Disabled
AwesomeMachine
great tips. When you say 'periodically' does that mean daily, monthly,?
 
Old 12-10-2016, 06:25 PM   #6
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
Code:
apt-get auto{remove,clean}
 
Old 12-10-2016, 08:22 PM   #7
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Smile When I think of it . . .

Quote:
Originally Posted by eco_bach View Post
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
 
Old 12-10-2016, 09:29 PM   #8
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Do you have a 2nd drive ?

If so, use a backup script to save important documents, etc.
And make sure your distro in iso form is also on another drive.

Here is an example.

Code:
#!/bin/bash
# 07.16.2016 21:17:42
#  Backup script customized for AMD system
gxmessage -fg red -font  'sans 20' -timeout 2 ' BACKING UP FILES FOR UBUNTU_MATE 64-BIT'
cd /home/andy/.mozilla/seamonkey/v23gi2p8.default/
cp -u -f bookmarks.html /media/andy/MAXTOR_SDB1/Linux_Files
zip -u ~/Documents/Ubuntu_Documents.zip *.html
#
cd ~/Documents
zip -u Ubuntu_Documents.zip *.txt *.doc *.rtf *.html *.png *.pdf *.odt *.ods *.odg
cp -u -f Ubuntu_Documents.zip /media/andy/MAXTOR_SDB1/Linux_Files
#
cd ~/Scripts
zip -u Ubuntu_Scripts.zip *.sh 
cp -u -f Ubuntu_Scripts.zip /media/andy/MAXTOR_SDB1/Linux_Files
#
cd /home/andy/Icons
zip -u Ubuntu_Icons.zip *.png
cp -u -f Ubuntu_Icons.zip /media/andy/MAXTOR_SDB1/Linux_Files
gxmessage -fg blue -font  'sans 20' -timeout 2 'BACKUP TO SDB1 COMPLETE. :-)'
#
cd /home/andy/Music
zip -u MUSIC2_MP3.zip *.mp3
cp -u -f MUSIC2_MP3.zip /media/andy/MAXTOR_SDB1/Linux_Files
vol 50
#vlc --play-and-exit /usr/share/Audio/Short_doorbell.wav
I also recommend redobackup-livecd-1.0.2.iso which makes a image of your hard drive.
 
Old 12-10-2016, 09:40 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
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.

Last edited by frankbell; 12-10-2016 at 09:52 PM.
 
Old 12-11-2016, 05:58 AM   #10
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Just keep your junk backed-up plus update regularly... if you keep having issues try a lighter and more free distro. Eg: http://www.linuxquestions.org/questi...ml#post5640434
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Practices jorran Linux - Newbie 4 01-18-2012 08:19 PM
Regular Maintenance Suggestions kitek Linux - Server 1 05-16-2011 09:38 AM
Recommendations for regular maintenance on 800GB samba share anon091 Linux - Newbie 4 04-27-2010 01:32 PM
LXer: Are proprietary maintenance fees worse than open-source maintenance fees? LXer Syndicated Linux News 0 12-04-2007 02:20 PM
Regular Server Maintenance gmitchell Linux - Networking 1 06-06-2005 01:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration