Linux: Ubuntu cheat sheet

Robert Andresen PC and apps Leave a Comment

This a personal Cheat sheet for Ubuntu (mostly server related stuff) + some MySQL and Docker commands. This page will be updated when I find useful commands 🙂

Guides

Disk

Show filsystem disk usage

Find what taking up diskspace

Database

Import / export mysql database

Docker

Auto-start / restart docker-container

Source: https://stackoverflow.com/questions/30449313/how-do-i-make-a-docker-container-start-automatically-on-system-boot

LAMP-stack

List installed PHP-extentions

Check for avalible PHP-extentions

Log

Read log-file backwards:

Check ssh login:

Troubleshoot

MySQL

#3009 – Column count of mysql.user is wrong. Expected 51, found 49. Created with MySQL 80012, now running 80015. Please use mysql_upgrade to fix this error.

Full /boot

Soruce: https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600