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)”
Author Archives: Farzand Ali
Changing the MTU on windows command prompt
Open a command line window as an Administrator (ie. right click on All Programs > Accessories > Command Prompt and select Run as administrator) … Type the command netsh and wait for prompt Type the command interface and wait for prompt Type the command ipv4 and wait for prompt Type the command set subinterface “Local AreaContinue reading “Changing the MTU on windows command prompt”
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”
Disk quota in Linux
On Linux, you can setup disk quota using one of the following methods: File system base disk quota allocation User or group based disk quota allocation On the user or group based quota, following are three important factors to consider: Hard limit – For example, if you specify 2GB as hard limit, user will notContinue reading “Disk quota 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”
How do I use cpio command under Linux?
Q. Can you explain how do I use cpio under Linux / UNIX? A. GNU cpio is a tool for creating and extracting archives, or copying files from one place to another. It handles a number of cpio formats as well as reading and writing tar files. cpio command works just like tar, only better.Continue reading “How do I use cpio command under Linux?”
5 UNIX / Linux file Command Examples
What is file? The file command accepts a file as an argument and performs certain tests to determine the correct file type. For example text, executable etc. 5 file Examples 1. A basic example The following basic example determines the file type for all the files present in current directory. $ file * cmd: ELFContinue reading “5 UNIX / Linux file Command Examples”