Cheatsheets
HomeWriteupsResourcesCheatsheets
Linux
Linux
  • Know Yourself and Your System
    • id
    • logname
    • uname
    • w
    • who
    • whoami
  • Surfing / Knowing Your File System
    • cd
    • df
    • du
    • ls
    • pwd
    • stat
    • tree
  • Knowing About Files / Commands
    • alias
    • file
    • info
    • whatis
    • apropos
    • man
    • help
    • history
    • script
  • Manipulating Files / Directories
    • touch
    • mkdir
    • rm
    • rmdir
    • cp
    • mv
    • ln
  • Interacting with Files
    • cat
    • head
    • less
    • middle
    • more
    • tail
  • STROPS / Text Manipulation
    • awk
    • cut
    • grep
    • jq
    • join
    • paste
    • sed
    • sort
    • tr
    • uniq
    • xargs
    • xclip
    • wc
    • tee
    • echo
    • comm
    • diff
    • patch
    • aspell
    • Combos
  • Formatting the Output
    • nl
    • fold
    • fmt
    • pr
    • printf
  • Searching / Finding
    • find
    • locate
    • which
    • whereis
    • type
  • Web Interaction
    • curl
    • wget
  • xxd
  • References
Powered by GitBook
On this page
  • Introduction
  • Syntax
  • Important Flags
  • Examples

Was this helpful?

  1. Knowing About Files / Commands

alias

alias linux command cheatsheet by Thamizhiniyan C S

Introduction

The alias command allows the user to create replacements for other commands and make them easier to remember and use.


Syntax

alias [option] [alias]='[command-or-path]'


Important Flags

Flag
Description

-p

Print the list of currently defined aliases.

-a

Define alias for all users (must be superuser).


Examples

Command
Description

To list all available aliases on the system

To list all available aliases on the system (Same as the above command)

Creating an alias named `print` which executes the `echo` command

Creating an alias named `list` which executes the `ls -la` command

To remove an alias

To remove all alias

PrevioustreeNextfile

Last updated 11 months ago

Was this helpful?

alias
alias -p
alias print="echo"
alias list='ls -la'
unalias [alias]
unalias -a