| by Scott Kilroy

Using an editor to create commands

If you have a long group of commands you need to run press Ctrl-X, followed by Ctrl-E This will open your default editor.  When you’re done close the editor (saving the file) and the command will run.

Share Button
Read More
| by Scott Kilroy

Using AWK

A good guide can be found at http://www.student.northpark.edu/pemente/awk/awk1line.txt

Share Button
Read More
| by Scott Kilroy

Use Cheat instead of man

http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ see for how to install and use.

Share Button
Read More
| by Scott Kilroy

Ubuntu – Reference

http://ubuntuguide.org/wiki/Ubuntu:Jaunty#User_Administration

Share Button
Read More
| by Scott Kilroy

Fstab Guide

Someday I’ll get around to writing something up but until then this guide is pretty good http://www.linuxstall.com/fstab/

Share Button
Read More
| by Scott Kilroy

Email – If port 25 is blocked

If your isp blocks port 25 (it should) redirect traffic coming in on port 2525 to port 25 /sbin/iptables -t nat -I PREROUTING -p tcp –dport 2525 -j REDIRECT –to-port 25 # make it so that this command runs on server boot up. if ! grep -qai 2525 /etc/rc.local; then echo ‘/sbin/iptables -t nat -I PREROUTING -p tcp –dport 2525 -j REDIRECT –to-port 25’ >> /etc/rc.local fi

Share Button
Read More
| by Scott Kilroy

Create a docker container with the name option

Create a docker container with a name you choose by including the –name=”NAME” option for example you could use docker create –name=”kilroy” ubuntu:latest

Share Button
Read More
| by Scott Kilroy

Docker hostname option

You can control the hostname when you start a container by using the –name option docker run –rm -ti –hostname =”mycontainer.linuxconsultant.org” ubuntu:latest

Share Button
Read More