May 6, 2021

Debian

hacks and tips and tricks what it is what it does .bashrc export PS1=’\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: ‘ ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up brings interface eth0 up with ip of 192.168.1.10 and netmask of 255.255.255.0, you may still have to add a route if you run route and you don’t see a last entry like “default […]

htaccess

install .htaccess apt-get install htpasswdapt-get install htpasswd add user cd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotherusercd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotheruser create .htaccess file in the directory you want to control access, create a new file like vi .htaccess AuthUserFile /pathtowhereyouwantthepasswordfile/.htpasswd AuthName "Authorization Required" AuthType Basic require valid-user chown www-data.www-data […]

mysql

First install the server. It will prompt you to enter a root password. apt-get install mysql-server mysql-clientapt-get install mysql-server mysql-client If you want a web-based “gui” manager for your server too, do: apt-get install phpmyadminapt-get install phpmyadmin what it is what it does create database somedatabasename;create database somedatabasename; creates a new database create table bikes […]

linux commands

  command what it does awk ‘!/virus=””/’ > sometextfile pipes notification of nasties to a text file called sometextfile cat /proc/meminfo shows your memory stuff (or just type “free”) cat /proc/version shows what version of Linux you’re running</td chmod -R 777 * changes ownership of all the files below where you are to read-write-executable…not normally […]