Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash alias

# open .bashrc to add your alias
nano ~/.bashrc
# add your alias
alias alias_name="command_to_run"
# activate the alias for the session
source ~/.bashrc
Comment

bash alias

Basic syntax:
alias abbreviated_command='original -long -command'

# Example process:
1. Open the .bashrc file with your favorite shell text editor. E.g.
	type "vi ~/.bashrc" 
    # Note, in general, the .bashrc file should be in your home
	# 	directory. Type "cd ~" and then "ls -a" to confirm that it's there
2. Define an alias on a new line using this basic syntax:
	alias abbreviated_command='original -long -command'
    E.g.: alias ls='ls --color -lhAFG'
3. Save and exit the .bashrc file (e.g. type ":q" and Enter in vi/vim/nvim)
4. Source the .bashrc file to apply/activate the alias. E.g.
	type "source ~/.bashrc"

# Note, I like having the following aliases to speed up this process:
alias bashrc='vi ~/.bashrc'
alias sourcebash='source ~/.bashrc'
Comment

how to add alias in linux

alias l="ls -al"
Comment

linux alias

# you can create alias in bash or linux by using "alias" command like this;

======================
# [Temporary Alias]
alias la="ls -la"
======================
# now you can use "ls -la" command just by typing "la" but it will only work
# till the current session

=============================================================
# [Permanent Alias]
step 1. > open  ~/.bashrc file in your favourite editor
step 2. > paste/write your alias their
step 3. > save and its done
==============================================================
Comment

linux add alias

# syntax
# alias *<alias-name>="*<what-alias-represents>"

# example
alias ll="ls -lrt"
Comment

How to use alias in Linux bash

alias ls='ls -F'
alias ll='ls -lh'
Comment

PREVIOUS NEXT
Code Example
Shell :: copy file in linux command 
Shell :: taskkill cmd 
Shell :: print in shell script 
Shell :: git reset a folder 
Shell :: powershell env vars 
Shell :: bash read file content 
Shell :: remove all files matching a pattern in subdirectories 
Shell :: matplotlib log colorbar 
Shell :: install node package globally 
Shell :: boostrap install angular 
Shell :: stacer download ubuntu 
Shell :: redis ubuntu 
Shell :: npm insall serve globally 
Shell :: create gitignore files 
Shell :: install git lfs 
Shell :: anbox install google play store 
Shell :: how to install socket.io to node js 
Shell :: composer install one line 
Shell :: PowerShell command list software windows server 2016 
Shell :: rename local branch github 
Shell :: heroku ubuntu install 
Shell :: linux terminal show processes 
Shell :: what is the ssh credentials for minikube 
Shell :: create a new branch and publish gitub 
Shell :: cannot send file to server with nginx 
Shell :: dns benchmark arch linux 
Shell :: powershell import module 
Shell :: How to get current git id 
Shell :: install aptitude ubuntu 20.04 
Shell :: installing appimage file ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =