Skip to content

Instantly share code, notes, and snippets.

@cpp-johnny
Created February 1, 2023 05:16
Show Gist options
  • Save cpp-johnny/8b604b4856b1342f7fd765ef3ce3a55c to your computer and use it in GitHub Desktop.
Save cpp-johnny/8b604b4856b1342f7fd765ef3ce3a55c to your computer and use it in GitHub Desktop.
bash aliases generated by ChatGPT
alias ll='ls -alF' (to show hidden files and files with their type)
alias ..='cd ..' (to go up one directory)
alias ...='cd ../..' (to go up two directories)
alias ~='cd ~' (to go to the home directory)
alias grep='grep --color=auto' (colorize the output of grep)
alias rm='rm -i' (to prompt before deleting files)
alias cp='cp -i' (to prompt before overwriting files)
alias mv='mv -i' (to prompt before overwriting files)
alias df='df -h' (to show disk usage in human-readable format)
alias du='du -h' (to show directory usage in human-readable format)
alias top='htop' (to use htop instead of top, a more user-friendly process manager)
alias ping='ping -c 5' (ping for 5 times by default)
alias ps='ps auxf' (to show a detailed list of all processes)
alias updatedb='sudo updatedb' (to update the locate database)
alias find='find . -name' (to search for files within the current directory)
alias .='pwd' (to print the current working directory)
alias ..='cd ..;pwd' (to go up one directory and print the current working directory)
alias c='clear' (clear the terminal screen)
alias la='ls -a' (list all files, including hidden ones)
alias ll='ls -l' (list files in long format)
alias lh='ls -lh' (list files in long format with human-readable file sizes)
alias tree='tree -hFC' (list directories in a tree-like format)
alias cat='cat -n' (show line numbers in the output of cat)
alias vi='vim' (use Vim instead of Vi as the default text editor)
alias cp='cp -v' (show verbose output when copying files)
alias mv='mv -v' (show verbose output when moving files)
alias wget='wget -c' (continue an interrupted download with wget)
alias ssh='ssh -X' (enable X11 forwarding for graphical applications over SSH)
alias scp='scp -r' (copy directories recursively using scp)
alias tar='tar -zcvf' (create a gzipped tar archive with verbose output)
alias untar='tar -zxvf' (extract a tar archive with verbose output)
alias ls='ls --color=auto' (colorize the output of ls)
alias l='ls -CF' (list files in a compact format with a classifier)
alias h='history' (show the command history)
alias rm='rm -rv' (remove files recursively with verbose output)
alias p='ps aux | less' (display the process list with less)
alias hg='history | grep' (search the command history with grep)
alias m='more' (use more as the default pager)
alias lr='ls -R' (list files recursively)
alias t='top -d 2 -n 10' (run top for 10 iterations with a refresh rate of 2 seconds)
alias g='grep --color=auto' (colorize the output of grep)
alias cdu='cd ..;du -sh' (change to the parent directory and display its size)
alias gi='grep -i' (run grep in case-insensitive mode)
alias lls='ls -lSr' (list files in long format sorted by size in reverse order)
alias lt='ls -lt' (list files in long format sorted by modification time)
alias s='sudo' (run a command with root privileges)
alias vi='vim -X' (run Vim in compatibility mode for X11 applications)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment