Category Archives: Operating System

MySQL Backup and Restore – Using Command Line

Here’s how you back up a database from the command line. The first line is the backup, the second is the restore. These commands work on both Windows and Linux. On Windows you might want to add the MySQL bin … Continue reading

Posted in Database, Linux, MySQL | Comments Off on MySQL Backup and Restore – Using Command Line

Benchmark How Long a Program Runs In Linux Using Bash

The following bash code might come in handy if you want to benchmark how long a program runs. The example assumes you want to pass two parameters along to the program. A timestamp is captured at the start and end … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on Benchmark How Long a Program Runs In Linux Using Bash

Auto Login Using SSH Public and Private Keys

2026 update: This post originally used ssh-keygen -t rsa. The current recommendation (e.g. GitHub’s SSH key guide) is Ed25519 — it produces shorter keys, is faster, and is considered more secure. Use RSA (4096-bit) only as a fallback for systems … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on Auto Login Using SSH Public and Private Keys

Linux symlinks: creating, deleting, and the gotchas worth knowing

The basic command for creating a symbolic link (a “symlink” or “soft link”) to a folder or file is ln -s: 12345678ln -s /home/ronald/somefolder /home/ronald/newfolder # or if your current directory is already /home/ronald: cd /home/ronald ln -s somefolder newfolder … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on Linux symlinks: creating, deleting, and the gotchas worth knowing

A Linux primer: identifying your distro and other commands that work everywhere

Here are a few commands you can use to find out which Linux distribution you’re on — pick whichever your system has: 1234567cat /etc/issue cat /proc/version dmesg | head -1 cat /etc/*-release Of those, cat /etc/*-release is the most reliable … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on A Linux primer: identifying your distro and other commands that work everywhere

How to Set up an FTP Server in Ubuntu Linux

Login to your Linux shell menu as root 12[root@locahost]# apt-get install vsftpd [root@locahost]# vim /etc/vsftpd.conf At VIM, 1st comment out anonymous_enable by adding a # sign at the beginning of the line # anonymous_enable=YES 2nd remove comment at local enable … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on How to Set up an FTP Server in Ubuntu Linux

Adding color to your tail

Tail is a very useful tool for monitoring an error stream. Sometimes the output from tail can have too much information, and its black-and-white monotone output can be hard to follow with the eyes. The basic: a Linux terminal has … Continue reading

Posted in Linux, Operating System, Ubuntu | Comments Off on Adding color to your tail

An nmap primer: scanning ports, fingerprinting hosts, and staying legal

If you just want a quick look at what’s listening on a Linux machine, the one-liner is: 1nmap -sS -O 127.0.0.1 That’s an nmap SYN scan with OS detection against your own loopback interface. If you’ve never used nmap before, … Continue reading

Posted in Linux, Operating System | Comments Off on An nmap primer: scanning ports, fingerprinting hosts, and staying legal

Find Files in Linux by Name

To find files in Linux with a certain name portion or pattern we can issue a locate command. If locate is unable to find a matching file, then you might need to update your file index database. 12# locate journal-2011-07 … Continue reading

Posted in Linux | Comments Off on Find Files in Linux by Name

Map Network Drive using DOS command

Create a batch file named mapdrive.bat and put the following inside it: 1234REM Map network drives net use j: \\server1\john_music net use p: \\server2\pdfs pause Explanation: Line 1 is a comment. Line 2 (and similarly line 3) maps the network … Continue reading

Posted in DOS | Comments Off on Map Network Drive using DOS command