Useful Linux Commands

Active 0 Reply 104 Views 2017-11-16 20:13:38 Linux

Collection of commands you might need...

Add something to the startup

$ nano /etc/rc.local

Adding a normal user to the system called "pi":

$ useradd pi -m -G sudo
$ passwd pi

Update / Upgrade the OS:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get autoremove
$ sudo reboot

DNS Error

$ sudo nano /etc/resolv.conf

and then add the lines to the file:


Make it secure (no overwriting)

$ chattr +i /etc/resolv.conf

Install Apache, PHP7

$ apt-get install apache2 apache2-doc apache2-utils

$ apt-get install libapache2-mod-php7.0 php7.0 php7.0-fpm php-pear php7.0-opcache php7.0-mbstring php7.0-mysql php7.0-curl php7.0-gd

Install MySQL & PHPMyAdmin:

$ sudo apt-get install mysql-server

$ sudo apt-get install phpmyadmin