Aliases for your terminal

I use to have these two:

alias statoff='sudo service --status-all | grep -w -'
alias staton=‘sudo service --status-all | grep +’

but the service command is apparently deprecated; I don’t know what to substitute for those aliases - they were handy to see what was running.

1 Like

I just made these because I seem to do alot of script installs.

#script install
alias con='sudo ./configure’
alias mk='sudo make’
alias mki=‘sudo make install’

1 Like

Very helpful. I must add these.

1 Like

Hey Dobbie03 I just corrected an error from my quote. There was a space missing. That’s why you’ll see the edit symbol is hilghlighted. Later dude.

1 Like

Cool, haven’t added them as yet.

I actually got AL out of the box. I was able to install on my second hdd with a second efi partition. So far it’s stable, but I have not allowed widows to see AL and vice versa. I’m transferring all of my important settings and files over. So I am going to be pretty busy setting things up and tweaking things.

My current aliases:

alias su='/bin/su'
alias sudo='/usr/bin/sudo'
alias passwd='/usr/bin/passwd'
alias ls='ls --color'
alias grep='grep --color'
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'

That’s from Alpine Linux (hence the paths), the first three are to prevent a rogue binary placed earlier in $PATH, the last ones are because I don’t know how to use pushd & popd :smiley:

Are we doing functions as well?

I use this as a poor person’s arch-chroot:

function mnt {
	for i in proc sys dev dev/pts; do sudo mount --bind /$i "$1"/$i; done &
	sudo chroot "$1" /bin/bash
	sudo umount -R "$1"/{proc,sys,dev}
}

So if the target filesystem tree is mounted under /mnt (for example) then this will chroot into it with the API filesystems bind mounted so that upgrades and stuff work (and clean up afterwards):

mnt /mnt

I’m using the KornShell function foo syntax rather than bash’s foo() version 'cos it’s better (local variables, traps, recursion support, etc).

1 Like

No need for grep with that one any more:

systemctl list-unit-files --state=enabled

For running units try:

systemctl list-unit-files --state=active

I can’t check though 'cos I’m booted with OpenRC :slight_smile:

1 Like

systemctl list-unit-files --state=enabled <- this works fine

this -

systemctl list-unit-files --state=active

works as:

systemctl --state=active

thanks.

Heaps of cool options here. Thanks for posting guys.

Came across this one today:

alias rms="echo 'I'\''d just like to interject for a moment.  What you'\''re referring to as Linux,
is in fact, GNU/Linux, or as I'\''ve recently taken to calling it, GNU plus Linux.
Linux is not an operating system unto itself, but rather another free component
of a fully functioning GNU system made useful by the GNU corelibs, shell
utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day,
without realizing it.  Through a peculiar turn of events, the version of GNU
which is widely used today is often called \"Linux\", and many of its users are
not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a
part of the system they use.  Linux is the kernel: the program in the system
that allocates the machine'\''s resources to the other programs that you run.
The kernel is an essential part of an operating system, but useless by itself;
it can only function in the context of a complete operating system.  Linux is
normally used in combination with the GNU operating system: the whole system
is basically GNU with Linux added, or GNU/Linux.  All the so-called \"Linux\"
distributions are really distributions of GNU/Linux.'"
5 Likes

Not much yet but like them all:

alias wttr="curl wttr.in/freiburg?0"
alias aura2="paste <(aura) <(echo -e '\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n') <(curl -s wttr.in/freiburg?0 | tail -n +2) --delimiters ''"
alias turbo0="echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo"
alias turbo="echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo"
alias roficlip="rofi -modi \"clipboard:greenclip print\" -show clipboard -run-command '{cmd}'"
~ alias
alias -- -='cd -'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias _='sudo'
alias babsh='bash-it'
alias bash_it='bash-it'
alias bash_ti='bash-it'
alias bashit='bash-it'
alias batbsh='bash-it'
alias batshit='bash-it'
alias bshena='bash-it enable alias'
alias bshenc='bash-it enable completion'
alias bshenp='bash-it enable plugin'
alias bshha='bash-it help aliases'
alias bshhc='bash-it help completions'
alias bshhp='bash-it help plugins'
alias bshsa='bash-it show aliases'
alias bshsc='bash-it show completions'
alias bshsch='bash-it search'
alias bshsp='bash-it show plugins'
alias c='clear'
alias cd..='cd ..'
alias cls='clear'
alias edit='nano'
alias grep='grep --color=auto'
alias h='history'
alias ipy='ipython'
alias irc='irssi'
alias k='clear'
alias l='ls -a'
alias l1='ls -1'
alias la='ls -AF'
alias ll='ls -al'
alias ls='ls --color=auto'
alias md='mkdir -p'
alias mirroredit='sudo leafpad /etc/pacman.d/mirrorlist'
alias pager=''
alias pass='passgen'
alias piano='pianobar'
alias pkg_size='expac -H M '\''%m\t%n'\'' | sort -h'
alias py='python'
alias q='exit'
alias rb='ruby'
alias rd='rmdir'
alias reload_aliases='source ${BASH_IT}/scripts/reloader.bash alias aliases'
alias reload_completion='source ${BASH_IT}/scripts/reloader.bash completion completion'
alias reload_plugins='source ${BASH_IT}/scripts/reloader.bash plugin plugins'
alias shit='bash-it'
alias sl='ls'
alias snano='sudo nano'
alias svim='sudo vim'
alias tree='find . -print | sed -e '\''s;[^/]*/;|____;g;s;____|; |;g'\'''
alias vbpf='vim ~/.bash_profile'
alias vbrc='vim ~/.bashrc'
alias xt='extract'
2 Likes

Old habits die hard, eh :monkey_face:

2 Likes

On my desktop arch I use only one alias, to start everything:

alias start=“rm .xsession-errors.old && compton -b && nvidia-settings && feh --bg-scale ‘/home/x/Images/black-red-graph.png’ && udisksctl mount -b /dev/sda1 && udisksctl mount -b /dev/sdc1 && htop”

:DDD

1 Like

These would make for some handy aliases.

3 Likes

Totally agree. Good idea.

alias ..='cd ..'
alias adp='adb push'
alias cls='echo -e '\''\0033\0143'\'''
alias commish='git commit -m "$(w3m whatthecommit.com | head -n 1)"'
alias df='df -h'
alias diff='colordiff'
alias dir='dir --color=auto'
alias du='du -c -h'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias free='free -m'
alias git='hub'
alias grep='grep --color=tty -d skip'
alias ll='ls -alh --color=auto'
alias ls='ls --color=none'
alias mirrorz='sudo reflector --verbose --latest 200 --protocol https --sort rate --save /etc/pacman.d/mirrorlist'
alias mkdir='mkdir -p -v'
alias more='less'
alias nano='nano -w'
alias ping='ping -c 5'
alias reboot='sudo reboot'
alias reload='clear && reset && cls && source ~/.bashrc'
alias rp='repopick '
alias sudo='sudo '
alias sup='import png:- | up1 | xsel -b'
alias sysu='systemctl --user'
alias up1='apaste'
alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'
alias vdir='vdir --color=auto'
alias wttr='curl wttr.in/dfw?format=3'
alias xup='sudo pacman -Sy && sudo powerpill -Su && yay -Su'

I’ve a neato function or 2 as well :slight_smile:

1 Like

Top @xstefen

1 Like

Why sudo="sudo "?

1 Like