

To remove the previous ls alias, you can use: unalias ls 4. alias The alias command.Īs the name suggests, the unalias command aims to remove an alias from the already defined aliases. If you want to list all the aliases you have in your shell session, you can run the alias command without argument.

Note that the value must be inside quotes.
#HPW TO DIRECTLY CD OPEN IN TERMINAL SERIES#
When creating an alias, you instruct your shell to replace a word with a series of commands.įor example, to set ls to have color without typing the -color flag every time, you would use: alias ls="ls -color=auto"Īs you can see, the alias command takes one key-value pair parameter: alias NAME="VALUE". The alias command lets you define temporary aliases in your shell session. Now the ls command output is colorized, and you can appreciate the difference between a directory and a file.īut typing ls with the color flag would be inefficient that’s why we use the alias command. This flag returns all the flags you can use with ls.įor example, to colorize the output of the ls command, you can use the following: ls -color=auto The colorized ls command. It has many options, so it might be good to get some help by using the -help flag. It allows you to list the contents of the directory you want (the current directory by default), including files and other nested directories. Ls is probably the first command every Linux user typed in their terminal. Many of these have multiple options you can string to them, so make sure to check out the commands’ manual. Now let’s dive into the 40 most-used Linux commands. If this isn’t working, search in your application panel for “terminal.” The Linux terminal emulator. In most Linux distributions, you would use Ctrl + Alt + T to do so. Before jumping into the most-used Linux commands, make sure to fire up a terminal.
