Martian Packet Messages

Occasionally, you might see messages like the following in your Linux kernel messages: martian source 192.168.1.1 from 127.0.0.1, on dev eth1<br />         ll header: 52:54:00:98:99:d0:52:54:00:de:d8:10:08:00 There’s a lot of discussion out there about what this means, but not a lot about how to trace down the source.  Hopefully this will provideContinue reading “Martian Packet Messages”

Basic MySQL Tutorial

The basic MySQL tutorial covers everything from managing databases, tables to querying data from tables by using various techniques such as projection, inner join, left join, etc. Manage Database in MySQL You will learn various statements to manage MySQL databases including creating a new database, removing an existing database, selecting a database to work withContinue reading “Basic MySQL Tutorial”

Ifconfig: 7 Examples To Configure Network Interface

Ifconfig command is used to configure network interfaces. ifconfig stands for interface configurator. Ifconfig is widely used to initialize the network interface and to enable or disable the interfaces. In this article, let us review 7 common usages of ifconfig command. 1. View Network Settings of an Ethernet Adapter Ifconfig, when invoked with no argumentsContinue reading “Ifconfig: 7 Examples To Configure Network Interface”

9 Linux ethtool Examples to Manipulate Ethernet Card (NIC Card)

Ethtool utility is used to view and change the ethernet device parameters. 1. List Ethernet Device Properties When you execute ethtool command with a device name, it displays the following information about the ethernet device. # ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full SupportsContinue reading “9 Linux ethtool Examples to Manipulate Ethernet Card (NIC Card)”

UNIX / Linux: Set your PATH Variable Using set or export Command

How do I add a new path to $PATH variable under Linux and UNIX like operating system? What is my path, and how do I set or modify it using csh/tcsh or bash/ksh/sh shell? The PATH is an environment variable. It is a colon delimited list of directories that your shell searches through when youContinue reading “UNIX / Linux: Set your PATH Variable Using set or export Command”

5+ Practical “chgrp” Command Usage Examples in Linux

What is chgrp? 5 chgrp Examples 1. To change the group name of a file or directory You can change the group of a file as shown below, $ ls -l -rw-r–r– 1 john john 210 2011-01-04 16:01 /home/john/sample.txt $ chgrp user /home/john/sample.txt $ ls -l -rw-r–r– 1 john user 210 2011-01-04 16:01 /home/john/sample.txt 2.Continue reading “5+ Practical “chgrp” Command Usage Examples in Linux”

A Beginner’s Guide to Editing Text Files With Vi

Vi is a powerful text editor included with most Linux systems, even embedded ones. Sometimes you’ll have to edit a text file on a system that doesn’t include a friendlier text editor, so knowing Vi is essential. Unlike Nano, an easy-to-use terminal text editor, Vi doesn’t hold your hand and provide a list of keyboardContinue reading “A Beginner’s Guide to Editing Text Files With Vi”

egrep and fgrep

An egrep example with multiple regular expressions Summary: How to use the Linux egrep command with multiple regular expressions (regex patterns). As a quick note here today, I just used the Linux egrep command to perform a case-insensitive search on multiple regular expressions (regex patterns). Really, what I did was a little more complicated: locate -i calendar |Continue reading “egrep and fgrep”

Bash Shell PS1: 10 Examples to Change Your Linux Prompt

1. Display username, hostname and current working directory in the prompt The PS1 in this example displays the following three information in the prompt: \u – Username \h – Hostname \w – Full path of the current working directory -bash-3.2$ export PS1=”\u@\h \w> ” ramesh@dev-db ~> cd /etc/mail ramesh@dev-db /etc/mail> 2. Display current time inContinue reading “Bash Shell PS1: 10 Examples to Change Your Linux Prompt”