fbpx Linux alias Command: Create Command Shortcuts | Certificação Linux

How to Create Keyboard Shortcuts in Linux

📅 08/20/2018 ⏱ 2 min ✍️ Uira Ribeiro
LinuxProductivity
How to Create Keyboard Shortcuts in Linux
Exam Pass App — mais de 7.000 questões LPI, offline, em 5 idiomas, disponível no Android e na App Store
Available on
Google Play
Available on
App Store

Do you know the Alias command?

An important shell feature is the ability to create aliases or shortcuts for commands. It can be used to simplify commands with many options or execute multiple processes in sequence.
&feature=youtu.be The alias creates these shortcuts:

# alias psuira='ps aux |grep uira'

# psuira

root 1200 0.0 1.3 5040 1752 ? S 10:17 0:00 sshd: uira@pts/4

uira 1201 0.0 1.3 2872 1656 pts/4 S 10:18 0:00 -bash

root 2657 0.0 0.4 1764 552 pts/4 S 21:19 0:00 grep uira

In this example the alias psuira corresponds to the commands ps aux | grep uira.

The list of aliases can be displayed with the alias command without any parameters:

# alias

alias +='pushd .'

alias -='popd'

alias ..='cd ..'

alias ...='cd ../..'

alias beep='echo -en "\007"'

alias dir='ls -l'

alias l='ls -alF'

alias la='ls -la'

alias ll='ls -l'

alias ls='/bin/ls $LS_OPTIONS'

alias ls-l='ls -l'

alias lsw='ls -l |more'

alias md='mkdir -p'

alias o='less'

alias psuira='ps aux |grep uira'

alias rd='rmdir'

alias rehash='hash -r'

alias unmount='echo "Error: Try the command: umount" 1>&2; false'

alias which='type -p'

alias you='yast2 online_update'

Learn much more about Linux in our online course. You can enroll here with a 7-day free trial. If you already have an account, you can access here.

Liked it? Share :-)

Uira Ribeiro

Prof. Uirá Ribeiro

Chair do Board do Linux Professional Institute

After years of watching professionals waste hours on simple tasks because they didn't know the right Linux tools, I decided to teach.
Today I'm the author of most of LPI's official Learning Materials and mentor to over 14,000 certified students.

See my full story →

That was just one piece. The course teaches the whole path — from your first command to exam day.

Certificação Linux — a plataforma líder em certificações Linux no Brasil
WhatsApp