IP/MAC Scanner from Linux Command Line?

I use IP Scanners all the time.  Angry IP and IP Scanner Pro are great GUI applications for Windows, OS X, and Linux.  But what if you’re only option is a linux command line?  NMAP is here to the rescue! If you want to scan an IP range for MAC and IP Addresses that are … Continue Reading

Update JUNOS Config with Remote API slax/juise

Mike over at High on PHP recently showed everyone the coolest thing in the world …. How to run SLAX on JUNOS boxes remotely with JUISE…. Seeing this in action nearly made me pee my pants! Too COOL! I went through his setup with ease…once I upgraded my Linux distribution.  (It requires curl libraries that were … Continue Reading

Show the entire contents of a file in Linux/Ubuntu/Mac

I’m primarily a Juniper engineer, so most of my commands are followed by ” | no-more”. If you’re like me, you probably like to print the entire contents of files/output and scroll up within the terminal. There’s a super easy command that will print the contents of a file to the screen. “cat” cat output.txt

Find files with matching content in Linux/Debian/Mac

Sometimes you have need to find all files with certain words in them.  If you’re on Linux/Debian/Mac, you can run a really simple command to find them! That command is “grep”. Here’s an example that recursively searches subfolders for “set groups node1” grep -iR ‘set groups node1’ * Here is the output:

How to make a static IP address in Ubuntu

If you have a new install of Ubuntu/Debian, you’ll notice that eth0 is always set to “DHCP”.  While this is fine and dandy for user environments, out there in the server world, we like static IP addresses. First thing’s first…. open the /etc/network/interfaces file. sudo vi /etc/network/interfaces Next, you want to change the eth0 DHCP setting … Continue Reading

Update $PATH variable on Mac Permanently

If you’re a developer or you commonly run apps from directory locations other than the default Mac locations, you probably hate typing out the full directory when running the app or script. To update the $PATH variable within the Terminal you just need to type: export PATH=/new/path:$PATH To update the $PATH variable PERMANENTLY you just … Continue Reading

Change Timezone in Ubuntu

If you want to change the timezone in Ubuntu, there is an easy text-based menu-driven way to do so. From the CLI type: sudo dpkg-reconfigure tzdata After you select the time zone, you should see something like this: Current default timezone: ‘America/Los_Angeles’ Local time is now: Thu Dec 8 09:39:56 PST 2011. Universal Time is … Continue Reading

Update/Setup MRTG (ubuntu)

If you’re running an MRTG server on Ubuntu, you may need to update it occasionally when new interfaces/routers are added. Stop the Service sudo /etc/init.d/mrtg stop Move the current config just in case something goes wrong sudo mv /etc/mrtg/mrtg.cfg /etc/mrtg/mrtg.cfg.old Make the configuration (I’m connecting to 3 devices) sudo cfgmaker –output=/etc/mrtg/mrtg.cfg sinatra@10.0.150.1 sinatra@10.0.150.254 sinatra@10.0.155.2 Edit … Continue Reading

Mount Apple TimeCapsule in Linux

If you have a linux server and you want to mount your Apple Time capsule, this is how: Mount with SMB (Time Capsules run this when file sharing is turned on) sudo mount -t smbfs -o username=ben,password=yourpassword,file_mode=0777,dir_mode=0777 “//10.0.100.5/Data” /timecapsule Verify Mount with “df -h” command ben@Ubuntu-VM-server:/$ df -h Filesystem Size Used Avail Use% Mounted on … Continue Reading