Command Line, Linux




How to create a PGP key on linux

First you'll want to create your key. gpg --gen-key Then ascii armor it for sharing. gpg --armor --export [email protected] You can view your keys by using the list command. gpg --list-keys



How to check number of mysql connections on linux

I needed to check how many mysql connections my application currently had. Not from the mysql side but from the application linux server. To do so I checked how many connections where on the mysql port (3306). netstat -antp | grep :3306 | wc -l



Asus boot usb

I needed to reinstall Lint Mint on my Asus Laptop. I couldn't figure out how to boot to usb. Turns out it's a tricky procedure. Have your USB drive plugged in Turn the Zenbook on Enter UEFI by pounding on the esc key Arrow to the right to the "Boot …



How to run ghost in the background

For running ghost blog in the background manually, execute the following within your blog directory. cd /path/to/your/install/ nohup npm start </dev/null 1>/path/to/your/install/logs/stdout.log 2>/path/to/your/install/logs/stderr.log & I perfer to run ghost in …



How to change a users shell to bash

How to change a user's shell to bash is a simple one liner. This is how you can do it in debian or ubuntu. chsh -s /bin/bash username



Add swap file in linux on debian

How to add a swap file to an existing file system is almost trivial. First decide how big you want it. I choose 1GB w/ a 1GB RAM machine. Second create the file. dd if=/dev/zero of=/swapfile bs=1024 count=1048576 Next make it a swap. mkswap /swapfile …



Install VirtualBox Guest Additions Command Line

I was digging around searching on how to install the VirtualBox Guest additions without the GUI using the command line. Most of the tutorials out there were of no help. Either with bad or outdated information. I found one article on xmodulo that worked for me. Here's the steps I …



How to specify a different git port

I needed to figure out how to specify a different ssh port for git. Turns out it's very easy. Open up your ssh config file. vim /home/your-user-name/.ssh/config Add a new configuration declaration Host git.example.org User your-user-name Port 22222 Save the new config and try that …



How to install Tomcat7 on Linux Mint

How to install tomcat7 on linux mint is simple. Run: sudo apt-get install tomcat7 tomcat7-admin tomcat7-common That's it. Now to configure the users for the mangers. Open the user file. sudo vim /etc/tomcat7/tomcat-users.xml Make it look like this: <?xml version='1.0' encoding='utf-8'?> < …



Error starting Tomcat7 “no JDK found – please set JAVA_HOME”

After I had set JAVA_HOME in the /etc/profile export JAVA\_HOME=/usr/lib/jvm/java-7-oracle/bin/java But Tomcat wasn't happy with that. So I went to Tomcat configuration directly. File: /etc/default/tomcat7 \$ vim /etc/default/tomcat7 ... \# The home directory of the Java development kit (JDK). You need …