≡ Menu


Red Hat / CentOS: Swap / Change Ethernet Aliases

Q. My Ethernet aliases are randomly switched and they are bound to the wrong interface. My eth0 became eth1 and eth1 become eth0. This is causing all sort of trouble for services and firewall configurations. How do I swap back and make sure Ethernet aliases works correctly under CentOS Linux server?
[click to continue…]

Bash Shell: Ignore Aliases and Functions When Running A Command

How do I ignore bash shell aliases or functions when running a command without removing alias or function from memory or current shell session on a Linux or Unix-like systems?
[click to continue…]

Clear all Linux / UNIX bash shell aliases

Q. How do I clear all UNIX bash shell aliases get cleared in one command. I’ve 20 aliases sometime I just need to delete them in a current session. How do I get rid of all of them?

A. You need to use unalias command/

unalias command syntax

unalias name

To remove alias called foo, enter
$ unalias foo

alias command with no arguments or with the -p option prints the list of aliases:
$ alias

alias ll='ls -lh'
alias ls='ls --color=auto'
alias vi='vim '
alias c='clear'
alias d="/usr/local/bin/chkdomain $@"

Clear all Linux / UNIX bash shell aliases

It will remove NAMEs from the list of defined aliases. If the -a option is given, then remove all alias definitions.
$ unalias -a

Understanding command line shell

Q. I’ve migrated from Windows NT to Linux workstation. Most documents refer to a command line shell. Can you explain me command line shell?

A. A shell allows you to type the commands such as date or clear. There are many shell available. BASH (bourne again shell) is default shell for most Linux distributions.

It also known as a command interpreter which takes command from user and pass the same to kernel for execution. Bash shell supports aliases, filename completion, command history, POSIX compatibility and many other features.

Other UNIX / Linux shell

  • csh / tcsh
  • sh / ksh

Linux command to remove virtual interfaces or network aliases

Q. How do I remove virtual interfaces such as eth0:1 or eth1:1?
[click to continue…]