Girtablulu Can you pop it up on https://hasteb.in/
What are your best / most used terminal aliases?
[deleted]
alias admedit="VISUAL=gedit sudoedit"
My personal favorite is:
alias dc='cd ..' # cd backwards
tomocafe If you use zsh
you don't even need the cd for that Can just do
..
Bash
alias ls='ls --color=auto --group-directories-first -v'
alias df='df -h -x squashfs' # Thanks popey for this one
.gitconfig
[url "https://github.com/"]
insteadOf = "gh:"
[alias]
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(cyan)(%an)%Creset' --abbrev-commit --date=relative
grab = "!f() { git clone git@github.com:tryton-vanmeer/$1.git; }; f"
incredible thread.
First time hearing this alias thing.
Now i have one alias:
alias ls="lsd"
- Edited
JoshStrobl Like a terminal ninja
Mostly just the following:
alias gradlew="./gradlew"
alias generatePkg="$HOME/.solus/common/Scripts/yauto.py"
alias updatePkg="/usr/share/ypkg/yupdate.py"
alias useUnstable="sudo eopkg ar Solus https://mirrors.rit.edu/solus/packages/unstable/eopkg-index.xml.xz"
alias useShannon="sudo eopkg ar Solus https://mirrors.rit.edu/solus/packages/shannon/eopkg-index.xml.xz"
First one is for Gradle so I can call ./gradlew
more easily, and the rest are for packaging/checking unstable for an early look at updates
~/.bash_aliases
## System Aliases ##
# ================ #
# Opens up bash_aliases file #
alias bashAliases="nvim ~/.bash_aliases"
# Fixes dual monitor scaling for 1080p monitor whilst using 4k laptop #
alias fixAcer="xrandr --output DP2 --scale 2x2"
## Programming Aliases ##
# ===================== #
# Robotics Aliases #
# ---------------- #
# Loads programs onto Formula AllCode #
alias faload="sudo /home/jazzyadmin/Programming/Tools/Faload/./faload"
# Opens up Formula AllCode API cheatsheet #
alias FACapi="less /home/jazzyadmin/Programming/FACResources/api_functions.md"
# PlantUML Aliases #
# ---------------- #
# Executes PlantUML #
alias pluml="java -jar /home/jazzyadmin/Programming/Tools/PlantUML/plantuml.jar"
## Vim Aliases #
# ============ #
# Opens a summary of Vim commands #
alias vimSummary="less /home/jazzyadmin/Documents/Random_Junk/viSummary"
# Opens up NeoVim config #
alias nvInit="nvim ~/.config/nvim/init.vim"
## Gaming Aliases ##
# ================ #
# DnD Aliases #
# ----------- #
# Opens Aelar's journal #
alias barovianJournal="nvim /home/jazzyadmin/Documents/Media/Games/PnP_RPGs/DnD/Notes/Barovia_Campaign/Barovian_Adventures.tex"
## Uni Aliases ##
# ============= #
# Makes a new minutes file #
alias make_minutes="cp /home/jazzyadmin/Programming/Templates/minutes_template.txt $(date '+%Y-%m-%d')_minutes.txt"
~/.bashrc
## Directories ##
# ============= #
# Uni Directories #
# --------------- #
# CS22120 Git Repository Clone #
export UNI_GIT="/home/jazzyadmin/Programming/GitProjects/Uni_Projects/GP07/GP07"
# Uni Work for Current Year #
export UNI_WORK="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2"
# CS22120 Work #
export UNI_WK_SE="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2/Software_Engineering/Group_Project"
# CS22120 Tech Design Spec #
export DESI_SPEC="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2/Software_Engineering/Group_Project/My_Documents/tech_design_spec"
# Formula AllCode Projects #
export FAC_PROJECTS="/home/jazzyadmin/Programming/MPLABXProjects"
# Gaming Directories #
# -------------------- #
export DND_DIR="/home/jazzyadmin/Documents/Media/Games/PnP_RPGs/DnD"
# Job Application Directories #
# ----------------------------- #
export MY_CV="/home/jazzyadmin/Documents/Professional/Awesome-CV/"
# Project Directories #
# -------------------- #
export STRING_BOI="/home/jazzyadmin/Programming/RandomProjects/StringManipulator"
I'm gonna start making more cheatsheets like the one I made for Vim and for my robotics module, cause they are really useful. I think commands that just copy files with an auto-generated name are also just awesome and I'm gonna add more for when I'm writing documentation.
- Edited
rav101 alias ipe='curl ipinfo.io/ip'
great! thanks
rav101 alias explore='nautilus .'
If I may suggest: 'nautilus . &'
JoshStrobl In case my brain derps:
alias eokpg epkg epokg eopgk...
deep derpd already, hence:
alias epi='sudo eopkg install'
alias epr='sudo eopkg remove'
alias eps='sudo eopkg search'
alias epupd='sudo eopkg up' #update solar system solus
JoshStrobl I also have a bunch of goToN...
Perfect! thanks, I knew there was a better way
Jazzyboy1 I'm gonna start making more cheatsheets like the one I made for Vim and for my robotics module, cause they are really useful.
same, I've made some light paper sheets to carry around and stick on the nearest wall. Much faster than switching screen/window focus and there's some kind of neuro-mind-to-hand-and-back-again that increases retainment for me, compared to just copy pasting some lists out on the screen .
Then mixing it with:
alias gb='cat .bashrc | grep'
Some other favs are:
alias gb='cat ~/.bashrc | grep'
alias ps='ps axjf'
alias gps='ps axjf | grep'
Often taking a man peek with man [program] | grep [word]
but don't know how to bash that out easier. Like ctrl+f on a webpage.
alias vgr='vagrant reload'
alias vup='vagrant up'...etc.
alias dk='docker'
alias dks='docker start'
alias dkr='docker run...etc'
Not so much an alias, but for helping the workflow i would recommend trying out fish.
I've used bash for a long time and basically create aliases for anything i type repeatedly, like everyone else.
But fish (the friendly interactive shell) really is friendly. It has colors, it tells yo autosuggestions, you can repeat commands or parts of really easily, it makes working on the terminal more enjoyable and faster. The folks from solus have made instructions on how to install it https://getsol.us/articles/configuration/changing-shell/en/ .
PS: Lots of youtubes out there on how to use it, that's how i bumped into it, and i'm glad to have tried it.
JoshStrobl I'm too attached to bash
since I am without root and stuck on ancient enterprise systems at work (hello, RHEL 5). Sysadmin would never respond to a request to install zsh
. I had to fight them just to change my login shell from csh
to bash
. Such a joy to come home and use Solus lol...
- Edited
Didn't even know this was a thing. Neat!
That being said, as a standard desktop user, I rarely use terminal outside of updating.
alias update='sudo eopkg ur'
alias upgrade='sudo eopkg up'
alias remove='sudo eopkg rm'
alias purge='sudo eopkg rmf'
alias details='eopkg info'
alias search='eopkg search'
alias install='sudo eopkg it'
alias yt='youtube-dl'
alias iftop='sudo iftop -i wlp0s20u4'
solt ....
It's a bash script collection to make my life simpler
- Edited
My favorite cls (same as windows cmd), up (same as cd.. ex up 3 is like ../../../), lsalias (got it from this forum), lsfunc (list all functions), fd (find), gr (grep string)
`
#SMILEY="[\e[32m] [\e[m]"
#FROWNY="[\e[31m]ï–´ [\e[m]"
#SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
#export PS1=" [\e[34m]\w[\e[m][\e[1;34m] `${SELECT}`ï„ [\e[00m] "
export PS1=" [\e[34m]\w[\e[m][\e[1;34m] ï„ [\e[00m] "
export GREP_COLOR="1;32"
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig
alias lsalias='grep "alias" /Documents/SOLUS/GIT_PROJECTS/linuxScripts/bashScripts/.bashrc_vj_script'
alias dummy='============================= git =================================='
alias gita='git add '
alias gitr='git rm '
alias gitc='git commit -m'
alias gitd='git diff --color-words'
alias gitp="git push origin master"
alias gitl='git log --graph --oneline --decorate'
alias gits='git status -sb'
alias giti='echo; git log -n 12 --graph --oneline --decorate; echo; git status; echo'
alias gito='git config --get remote.origin.url'
alias gitst='git stash'
alias dummy='============================= System ==============================='
alias du='du -h --max-depth=1 | sort -hr'
alias lsblk='lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,UUID'
alias blkid='sudo blkid'
alias fdisk='sudo fdisk -l'
alias parted='sudo parted -l'
alias ls='ls -lah --group-directories-first --color=auto'
alias grep='grep --color=auto'
alias cls='printf "\033c"'
alias fd='sudo find / -name '
alias gr='sudo grep -iRl'
up() { cd $(eval printf '../'%.0s {1..$1}); }
#export _JAVA_AWT_WM_NONREPARENTING=1
alias dummy='===================================================================='
=== Create git repo ===
function vj_mkgitrepo {
curl -u "viyoriya" https://api.github.com/user/repos -d '{ "name": "${1}" }' ;
}
=== Solus ===
function vj_solgc {
git clone https://dev.getsol.us/source/${1}.git
cd ${1}
ls -hl --group-directories-first
}
alias lsfunc='declare -F | grep 'vj''
alias lsfuncName='compgen -A function | grep 'vj''
alias fetchYml="../common/Scripts/yauto.py"
alias pcp='echo $(pkg-config --variable pc_path pkg-config)'
alias dummy='===================================================================='
alias hp="htop -u nobody"
alias nanorc="ls -l /usr/share/nano/.nanorc | awk '{print \"include \" \$9;}' >> /.nanorc"
alias nanovj="ls -l /Documents/SOLUS/GIT_PROJECTS/linuxScripts/nanorc/.nanorc | awk '{print \"include \" \$9;}' >> /.nanorc"
alias neofetch='/usr/bin/neofetch && python3 /Documents/SOLUS/GIT_PROJECTS/linuxScripts/tubescript.py'
alias nqq=notepadqq
alias tldr='f() { curl cheat.sh/$1; };f'
alias dummy='===================================================================='
alias tsr='tmux kill-server'
alias tsa='tmux kill-session -a'
alias tst='tmux kill-session -t '
alias tls='tmux list-sessions'
#alias tk='pkill -f tmux'
alias m2='sudo mkdir -p /mnt/so && sudo mount /dev/sda2 /mnt/so'
alias m3='sudo mkdir -p /mnt/ma && sudo mount /dev/sda3 /mnt/ma'
alias m4='sudo mkdir -p /mnt/vo && sudo mount /dev/sda4 /mnt/vo'
alias m5l='sudo mkdir -p /mnt/lfs && sudo mount /dev/sda5 /mnt/lfs'
alias m5t='sudo mkdir -p /mnt/ta && sudo mount /dev/sda5 /mnt/ta'
alias m2u='sudo umount /mnt/so'
alias m3u='sudo umount /mnt/ma'
alias m4u='sudo umount /mnt/vo'
alias m5lu='sudo umount /mnt/lfs'
alias m5tu='sudo umount /mnt/ta'
alias usbp1='sudo chmod -R a+rwX,o-w '
alias usbp2='sudo chown -R $USER:$USER '
alias proj='cd /Documents/SOLUS/GIT_PROJECTS/'
alias smi='sudo make install'
alias sdwm='cd /Documents/SOLUS/GIT_PROJECTS/wm/suckless/dwm/'
alias ssc='sudo subl config.h'
alias dummy='====================== END ========================================'
`
- Edited
alias cls=clear
alias smc="sudo mc"
alias apt=eopkg
alias pkg=eopkg
alias up='sudo eopkg up'
alias e='sudo mcedit'
alias rv='sh rocview.sh'
alias wetter='curl www.wttr.in'
alias md='mkdir'
alias getip='wget http://ipecho.net/plain -O - -q ; echo'
alias server='ssh user@192.168.0.10'
#alias gowin='sudo efibootmgr --bootnext $(efibootmgr | grep Windows | tail -n1 | cut -d' ' -f1 | cut -d't' -f2 | sed s/.$//) && reboot'
alias xtd='sudo roccatkonextdconfig'
eopkg info linux-current | grep linux-current,
the alias "gowin" isn't active since it doesn't work on my Lenovo Legion 5 notebook.