linux:system

Sprawy dot. systemu Linux

Co jakiś czas trzeba instalować po raz kolejny Linuxa na kolejnym komputerze. Kiedy powstanie mechanizm skryptowy, który pozwoli raz a dobrze zanotować wszystkie te programiczki, które chcemy i powinniśmy mieć na naszej jednostce, żeby z satysfakcją i spokojem jej używać?

Narzędzia, które działają w terminalu i bardzo usprawniają pracę.

  • htop - lepszy top
  • ncdu - tekstowe skanowanie wielkości zajętości katalogów na dysku
  • nmap - wszystko, co się da, o zdalnym hoście dowiesz się dzięki niemu
  • texlive-full
  • texlive-lang-all
  • texlive-extra-utils
  • latex2html
  • latex2rtf
  • texmaker
  • texworks
  • tth
  • lyx
  • pdf2djvu
  • pdf2svg
  • poppler-utils
  • pdftk
  • ghostscript
  • qpdf
  • htmldoc
  • e2ps
  • diffpdf
  • html2text
  • html2markdown
  • html2ps
  • tth
  • txt2html
  • t2html
  • pandoc
  • odt2txt
  • stx2any
  • xfpt
  • vim
  • autogen
  • dos2unix
  • wv

Create a backup of what packages are currently installed:

dpkg --get-selections > list.txt

Then (on another system) restore installations from that list:

dpkg --clear-selections
sudo dpkg --set-selections < list.txt

To get rid of stale packages

sudo apt-get autoremove

To get installed like at backup time (i.e. to install packages set by dpkg –set-selections)

sudo apt-get dselect-upgrade

Lepsze niż sprawdzanie w pętli…

du -hx --max-depth=1 /

Najpierw:

sudo apt-get autoclean
sudo apt-get autoremove

Rozważ, czy na tym komputerze potrzebujesz te wszystkie zainstalowane programy:

dpkg --get-selections | grep -v deinstall

Jeżeli chcesz zobaczyć, czy przypadkiem nie masz tam jakiegoś puszystego pakietu, wypytaj po nazwie, jak np.:

dpkg --get-selections | grep -v deinstall | grep office

Potem:

Porada znaleziona na Askubuntu

Since the case involves a system with 100% HD usage, so, installing any application will not work. The only safe option is to delete unnecessary files first.

First in row would be temporary files

sudo rm -rf /tmp/*

Second, delete the cached applications. These are the binaries of applications and upgrades downloaded through the lifespan of the system. Normally this would be no less than 500 MB in an average Ubuntu system with one year of operation, and would give you a breather to install another apps.

sudo rm /var/cache/apt/archives/*deb

Then I would recommend deleting old log files

sudo rm /var/log/*gz

By this you would have at least free space of around 700 MB. This will allow you to work with utilities and install new ones.

Then I would install ncdu, which is a fast utility to scan the whole harddisk, and order directories by size. It is really fast, and works like a charm.

sudo apt-get install ncdu

then run it with the command

sudo ncdu /

The slash after ncdu is to scan from the root directory.

All the above works in ubuntu server as well as Desktop. Now, after doing all the above, and you are running on a Desktop environment, then , you can go for GUI utilities such as ubuntu-tweak (which is excellent by the way) and delete the old kernels. I usually keep the latest kernel, and the one before the latest, in case of upgrade failures.

Hope that this would help.

  • linux/system.1414136953.txt.gz
  • ostatnio zmienione: 2022/05/22 10:37
  • (edycja zewnętrzna)