Showing posts from August, 2020

How to upgrade from Ubuntu Linux 16.04 to 18.04

Type the apt command or apt-get command to upgrade existing system:   sudo apt update   sudo apt upgrade Reboot the Linux box if kernel was updated   sudo reboot If you have a ufw firewall running on ufw, open ssh port 1022 using the following ufw syntax:   sudo ufw allow 1022/tcp comment 'Temp open port ssh tcp port 1022 for upgrade' Upgrade the operating system to the latest release from the command-line by typing the following command:   sudo do-release-upgrade After some time you will see “System upgrade is complete” message. Press y to restart your system to load updates kernel and operating system for your cloud server: Verification Login using the ssh command:   ssh user@your-ubuntu-server Verify Ubuntu Linux kernel version with uname:   uname -r Make sure all needed ports are open and running with the ss command or netstat command:   sudo ss -tulpn   sudo netstat -tulpn Use grep command/egrep command or tail command/cat command to verify log files for errors:    dmesg  

Copy a text of div by button click by javascript

Your html code  <input type="button" id="copyme" value="COPY THE DIV"> <div id="mypolicy">THIS IS WHAT I WANT TO COPY</div> js script $('#copyme').on('click', function(){     id =     var range = document.createRange();     range.selectNode(document.getElementById(id));     window.getSelection().removeAllRanges();   // clear current selection     window.getSelection().addRange(range);   // to select text     document.execCommand("copy");   });