1. SSH into your ESXi server
2. Get a list of all registered virtual machines, identified by their VMID, Display Name and path to the .vmx configuration file
vim-cmd vmsvc/getallvms
...
1. SSH into your ESXi server
2. Get a list of all registered virtual machines, identified by their VMID, Display Name and path to the .vmx configuration file
vim-cmd vmsvc/getallvms
...
ssh USER@HOST 'bash -s' < SCRIPT $ ssh skayal@192.168.1.15 'bash -s' < script.sh ...
Read Moresudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install terraform Verify the installation terraform -help Enable tab completion touch ~/.bashrc OR touch ~/.zshrc Install the autocomplete package terraform -install-autocomplete...
Read More* Take dump of all databases: # mysqldump --skip-lock-tables -A > alldb.sql * * Check where MySQL keeps its files(in my case it's /var/lib/mysql/): # mysql -NBe "SELECT @@datadir" * /var/lib/mysql/ * * Stop MySQL # mysqladmin shut * * Move old MySQL files to safe place # mv /var/lib/mysql /var/lib/mysql.old * * Create new system database # mkdir /var/lib/mysql * # sudo apt-get install mysql-server * * Start MySQL # /etc/init.d/mysql start * * Restore the dump #...
Read MoreFind all directories owned by user find . -type d -user kayals Rename filename with spaces to Underscore for f in *\ *; do mv "$f" "${f// /_}"; done...
Read MoreStep 1 — Installing Certbot sudo apt install certbot python3-certbot-apache Step 2 — Obtaining an SSL Certificate sudo certbot --apache -d domainname ...
Read MoreThere are two ways to make this happen. The first is using the semicolon like so: sudo apt-get update; sudo apt-get upgrade -y The only problem with that method is that the second command will run, even if the first command fails. In those cases, you'd run the command: sudo apt-get update && sudo apt-get upgrade -y Both versions of the command will run, but the second form will only run...
Read MoreMySQL 5.7 and above Creating a Superuser for phpMyAdmin In terminal, log in to MySQL as root. sudo mysql -p -u root CREATE USER 'pmauser'@'localhost' IDENTIFIED BY 'password_here'; Now we will grant superuser privilege to our new user pmauser. GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'localhost' WITH GRANT OPTION; You should now be able to access phpMyAdmin using this new user account....
Read More