Basics of Bash

Making custom commands with aliases

Video may be blocked due to browser extensions. In the article you will find a solution to this problem.

Lesson notes

  • alias to view all aliases
  • alias name='command' to create a new alias named name for the command command (e.g. alias lss='ls | sort -r')
  • unalias name to unalias an alias named name

Some useful aliases

  • alias c='clear' — clears the screen with c
  • alias ..='cd ..' - quickly go one level up with ..
  • alias h='history' — quickly access history with h

<span class="translation_missing" title="translation missing:">Mentor Avatars</span>

Are there any more questions? Ask them in the Discussion section.

You will be answered by the mentors from the Hexlet team or other students.

Sign up

or Sign in

Programming courses for beginners and experienced developers. Start training for free.

  • 115 courses, 2000+ hours of theory
  • 800 practical tasks in a browser
  • 250 000 students

By sending the form, you agree to "Personal Policy" and "Service Conditions".

Our graduates work in companies:

Alfa Bank logo
Rambler logo
Bookmate logo
Botmother logo

Do you have a question or would you like to participate in a discussion?

Sign up or sign in

By sending the form, you agree to "Personal Policy" and "Service Conditions".