Category: Linux

Debian, Linux, SmokingLinuxEveryDay

p7zip – file archiver

p7zip is the Unix command-line port of 7-Zip, a file archiver that handles the 7z format which features very high compression ratios. p7zip provides: – /usr/bin/7zr – a standalone minimal version of the 7-zip tool that only handles 7z, LZMA and XZ archives. 7z compression is 30-50% better than ZIP compression. – /usr/bin/p7zip – a …

Linux, Security

Change admin passwords

System sudo passwd rootsudo passwd root MySQL mysqladmin -u root -p passwordmysqladmin -u root -p password PostgreSQL sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;"sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;" Gitlab GLPI Project mysql -u …

Linux

Debian – Awesome Zsh

Install zsh sudo apt-get install zshsudo apt-get install zsh Download prezto git clone –recursive https://github.com/sorin-ionescu/prezto.git ~/.zpreztogit clone –recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto Create symlinks setopt EXTENDED_GLOB; for rcfile in /home/<username>/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "/home/<username>/.${rcfile:t}"; donesetopt EXTENDED_GLOB; for rcfile in /home/<username>/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "/home/<username>/.${rcfile:t}"; done or ln -s /home/<username>/.zprezto/runcoms/zlogin /home/<username>/.zlogin ; ln -s /home/<username>/.zprezto/runcoms/zlogout /home/<username>/.zlogout …

Linux, Security

Get a list of Open Ports in Linux

netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Get a list of open tcp/udp ports sudo netstat -plntusudo netstat -plntu -p = display PID/Program name for sockets -l = display listening server sockets -n = don’t resolve names -t = tcp ports -u = udp ports https://en.wikipedia.org/wiki/Netstat https://linux.die.net/man/8/netstat

Kali, XFCE

Can’t browse samba networks using Thunar

If you can’t access samba shares from Kali Linux using the xfce environment and the Thunar file manager, install the following packages: apt-get install gvfs*apt-get install gvfs* Logout and login back and try to access a samba shared folder using Thunar: smb://x.c.v.b/dirname/smb://x.c.v.b/dirname/ Gvfs GVfs is a userspace virtual filesystem designed to work with the I/O …

Apache, Linux, MySQL, PHP, Ubuntu Server

Install LAMP stack on Ubuntu 16.04

Update system sudo apt-get update &amp;&amp; sudo apt-get dist-upgradesudo apt-get update &amp;&amp; sudo apt-get dist-upgrade Install Apache sudo apt-get install apache2sudo apt-get install apache2 Install MySQL sudo apt-get install mysql-serversudo apt-get install mysql-server Install PHP sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-gettextsudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-gettext Install PHPMyAdmin sudo …

Linux

Move directory to another server

* Compress directory tar cvzf myfolder.tar.gz myfolder/tar cvzf myfolder.tar.gz myfolder/ * Copy directory scp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gzscp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gz * Extract directory contents on new server tar -xvzf myfolder.tar.gz -C /path/to/myfoldertar -xvzf myfolder.tar.gz -C /path/to/myfolder