# unalias

## PROLOG



           This manual page is part of the POSIX Programmer's Manual.  The
           Linux implementation of this interface may differ (consult the
           corresponding Linux manual page for details of Linux behavior), or
           the interface may not be implemented on Linux.
    


## NAME



           unalias — remove alias definitions
    


## SYNOPSIS



           unalias _alias-name_...
    
           unalias -a
    


## DESCRIPTION



           The _unalias_ utility shall remove the definition for each alias
           name specified. See _Section 2.3.1_ , _Alias Substitution_.  The
           aliases shall be removed from the current shell execution
           environment; see _Section 2.12_ , _Shell Execution Environment_.
    


## OPTIONS



           The _unalias_ utility shall conform to the Base Definitions volume
           of POSIX.1‐2017, _Section 12.2_ , _Utility Syntax Guidelines_.
    
           The following option shall be supported:
    
           **-a** Remove all alias definitions from the current shell
                     execution environment.
    


## OPERANDS



           The following operand shall be supported:
    
           _alias-name_
                     The name of an alias to be removed.
    


## STDIN



           Not used.
    


## INPUT FILES



           None.
    


## ENVIRONMENT VARIABLES



           The following environment variables shall affect the execution of
           _unalias_ :
    
           _LANG_      Provide a default value for the internationalization
                     variables that are unset or null. (See the Base
                     Definitions volume of POSIX.1‐2017, _Section 8.2_ ,
                     _Internationalization Variables_ for the precedence of
                     internationalization variables used to determine the
                     values of locale categories.)
    
           _LC_ALL_    If set to a non-empty string value, override the values
                     of all the other internationalization variables.
    
           _LC_CTYPE_  Determine the locale for the interpretation of sequences
                     of bytes of text data as characters (for example,
                     single-byte as opposed to multi-byte characters in
                     arguments).
    
           _LC_MESSAGES_
                     Determine the locale that should be used to affect the
                     format and contents of diagnostic messages written to
                     standard error.
    
           _NLSPATH_   Determine the location of message catalogs for the
                     processing of _LC_MESSAGES_.
    


## ASYNCHRONOUS EVENTS



           Default.
    


## STDOUT



           Not used.
    


## STDERR



           The standard error shall be used only for diagnostic messages.
    


## OUTPUT FILES



           None.
    


## EXTENDED DESCRIPTION



           None.
    


## EXIT STATUS



           The following exit values shall be returned:
    
            0    Successful completion.
    
           >0    One of the _alias-name_ operands specified did not represent a
                 valid alias definition, or an error occurred.
    


## CONSEQUENCES OF ERRORS



           Default.
    
           _The following sections are informative._
    


## APPLICATION USAGE



           Since _unalias_ affects the current shell execution environment, it
           is generally provided as a shell regular built-in.
    


## EXAMPLES



           None.
    


## RATIONALE



           The _unalias_ description is based on that from historical KornShell
           implementations.  Known differences exist between that and the C
           shell. The KornShell version was adopted to be consistent with all
           the other KornShell features in this volume of POSIX.1‐2017, such
           as command line editing.
    
           The **-a** option is the equivalent of the _unalias_ * form of the C
           shell and is provided to address security concerns about unknown
           aliases entering the environment of a user (or application)
           through the allowable implementation-defined predefined alias
           route or as a result of an _ENV_ file. (Although _unalias_ could be
           used to simplify the ``secure'' shell script shown in the _command_
           rationale, it does not obviate the need to quote all command
           names. An initial call to _unalias_ **-a** would have to be quoted in
           case there was an alias for _unalias_.)
    


## FUTURE DIRECTIONS



           None.
    


* * *