Category Archives: Linux

How to Install a .Deb File on Debian Linux via Command-Line

Steps to install, remove and reconfigure Debian .deb packages: Install a .deb package: sudo dpkg -i DEB_PACKAGEsudo dpkg -i DEB_PACKAGE Remove a previously installed package: sudo dpkg -r PACKAGE_NAMEsudo dpkg -r PACKAGE_NAME Reconfigure an existing package: sudo dpkg-reconfigure PACKAGE_NAMEsudo dpkg-reconfigure PACKAGE_NAME

Install VirtualBox 6.0 on Debian 10 Buster

Tutorial to install VirtualBox 6.0 on Debian 10 Buster: First add this line to /etc/apt/sources.list deb buster contribdeb buster contrib Then download and register the Oracle public keys: wget -q -O- | apt-key add – wget -q -O- | apt-key add -wget -q -O- | apt-key add – wget -q […]

Install Windows 7 Guest on VirtualBox Debian Host (Command-Line)

To install Windows 7 guest on a VirtualBox Debian host type: VBoxManage createhd –filename Win7-64bit-VM1.vdi –size 32768 VBoxManage createvm –name Win7-64bit-VM1 –ostype Windows7_64 –register VBoxManage storagectl Win7-64bit-VM1 –name "SATA Controller" –add sata –controller IntelAHCI VBoxManage storageattach Win7-64bit-VM1 –storagectl "SATA Controller" –port 0 –device 0 –type hdd –medium Win7-64bit-VM1.vdi VBoxManage storagectl Win7-64bit-VM1 –name "IDE Controller" –add […]

Create or Restore a VirtualBox Snapshot on Debian (Command-Line)

To create a snapshot type: VBoxManage snapshot VM-NAME take SNAPSHOT-NAMEVBoxManage snapshot VM-NAME take SNAPSHOT-NAME To revert back to a particular snapshot type: VBoxManage snapshot VM-NAME restore SNAPSHOT-NAMEVBoxManage snapshot VM-NAME restore SNAPSHOT-NAME

How to Shutdown or Reboot Debian 10 Buster

This command will reboot Debian 10 Buster: systemctl rebootsystemctl reboot This command will shutdown (poweroff) Debian 10 Buster: systemctl poweroffsystemctl poweroff

Install Node.js Puppeteer on Debian 9 Stretch

Steps to install Puppeteer (Headless Chrome Node API) on Debian 9 Stretch. First you need to install Node.js 12.x: curl -sL | bash – apt-get install -y nodejscurl -sL | bash – apt-get install -y nodejs Then install Puppeteer module: npm install -g puppeteer –unsafe-perm=truenpm install -g puppeteer –unsafe-perm=true Now fix the “No […]

Install Node.js 12.x on Debian 9 Stretch

To install Node.js 12.x on Debian 9 Stretch just type: curl -sL | bash – apt-get install -y nodejscurl -sL | bash – apt-get install -y nodejs Some Node.js modules may require build-essential: apt-get install build-essentialapt-get install build-essential References: Installing Node.js via package manager NodeSource Node.js Binary Distributions

Python Socket IPv6 (AF_INET6) Listen

Listen on an IPv6 address and port in Python with socket(): ADDR = (HOST, PORT) serversock = socket.socket(family=socket.AF_INET6) serversock.bind(ADDR) serversock.listen(0)ADDR = (HOST, PORT) serversock = socket.socket(family=socket.AF_INET6) serversock.bind(ADDR) serversock.listen(0) Change HOST and PORT as needed.

DEB.SURY.ORG Updated the Signing Key (March 2019)

On 18 March 2019 OndÅ™ej announced that he changed the signing key: I was informed that the current DPA signing key DF3D585DB8F0EB658690A554AC0E47584A7A714D was present on the server maintained by an other user of the repositories that got compromised. I do not believe that the users of the repositories are at any risk because […]

Bash Script to Dump a MySQL Table into a CSV File

Simple bash script to dump a MySQL table into a CSV file: mysql dbname -u’user’ -p’password’ <<QUERY_INPUT SELECT field1, field2, field3, field4 FROM table_name INTO OUTFILE ‘/path/file.csv’ FIELDS ENCLOSED BY ‘"’ TERMINATED BY ‘,’ ESCAPED BY ‘"’ LINES TERMINATED BY ‘\r\n’; QUERY_INPUTmysql dbname -u’user’ -p’password’ <<QUERY_INPUT SELECT field1, field2, field3, field4 FROM table_name INTO OUTFILE […]