Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Kaan Kuscu
Kaan Kuscu

Posted on

     

Most Used 10 Terminal Aliases on Linux

In post, i will show you most used 10 Linux terminal aliases.

What is alias?

Alias is short way of writing commands on terminal.

How to add aliases?

This process is change according to your command shell.
If you are using bash (mostly used), you can add aliases to~/.bashrc file.
If you are using Fish, you an add aliases yo~/.config/fish/config.fish file.

1)alias c="clear" - writec for clear

2)alias r="source ~/.bash_profile" - writer for reload bash

3)alias del="rm -rf" - writedel for recursive and force removing process.

4)alias untar="tar -zxvf" writeuntar filename for unpack tar file

5) For update commands
alias update="sudo apt-get update" for Debian based (Ubuntu...)
alias update="sudo pacman -Syyu" for Arch Linux based (Manjaro Linux...)
alias update="yum update" for Red Hat based (Fedora, CentOS, RHEL)

6) For installing an application
alias app="sudo apt-get install" for Debian based
alias pac="sudo pacman -S" for Arch Linux based.
alias app="dnf install" for RHEL based.

7) Git add and commit
gac "your message"
alias gac="git add . && git commit -a -m "

8) Installnode packages
nis packagename
alias nis="npm install --save"

9) Make and enter inside a directory
mkcd foldername
alias mkcd='foo(){ mkdir -p "$1"; cd "$1" }; foo '

10) Controlcd command behavior
alias cd.1="cd .."
alias cd.2="cd ../.."
alias cd.3="cd ../../.."
alias cd.4="cd ../../../.."
alias cd.5="cd ../../../../.."
alias cd.6="cd ../../../../../.."

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Null
  • Location
    Turkey
  • Work
    nil at nil
  • Joined

More fromKaan Kuscu

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp