This should be fun. Share your alias collection. :)

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
KernSpy
Posts: 144
Joined: Wed Nov 05, 2014 10:09 pm

This should be fun. Share your alias collection. :)

#1 Post by KernSpy »

Just think it might be fun to share Aliases and bashrc files. Perhaps some of you
gearheads don't even use bash anymore? It would be nice to see what nifty aliases
you folks have created.

Just thought it might be fun .. :smile:

Kern...
MX-19.2_x64 | System76 Galago UltraPro / Clevo W740SU | Intel Core i7-4770HQ | Intel Iris Pro Graphics 5200 | 16 GB DDR3 | Intel 530 series mSATA SSD - 240-GB | WD7500BPKX - 750-GB | Intel HD Audio.

User avatar
Eadwine Rose
Administrator
Posts: 11968
Joined: Wed Jul 12, 2006 2:10 am

Re: This should be fun. Share your alias collection. :)

#2 Post by Eadwine Rose »

My alias has been the same ever since I hopped on the internet. Either Eadwine, or Eadwine Rose (back when I needed a last name for yahoo :laugh: )
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
i_ri
Posts: 831
Joined: Tue Jun 30, 2015 12:26 am

Re: This should be fun. Share your alias collection. :)

#3 Post by i_ri »

hello KernSpy and yours? you currently have a great avatar.
. here and hithere. b e t t y @ b o o p H . o m e , Workgroup =NONEJOINED. errrr, can we start another thread about favorite passwords? That's where we really shine.

User avatar
KernSpy
Posts: 144
Joined: Wed Nov 05, 2014 10:09 pm

Re: This should be fun. Share your alias collection. :)

#4 Post by KernSpy »

My .bashrc doesn't have many entries.

sudo apt-get update .. saud
sudo apt-get dist-upgrade .. saug
sudo apt-get install .. install
clear screen .. cls
la .. ls -Al
ps .. ps auxf

That is pretty much it.

I dl'ed the Ultimate bashrc, so that should be interesting.

Kern ..
MX-19.2_x64 | System76 Galago UltraPro / Clevo W740SU | Intel Core i7-4770HQ | Intel Iris Pro Graphics 5200 | 16 GB DDR3 | Intel 530 series mSATA SSD - 240-GB | WD7500BPKX - 750-GB | Intel HD Audio.

User avatar
Jerry3904
Administrator
Posts: 21958
Joined: Wed Jul 19, 2006 6:13 am

Re: This should be fun. Share your alias collection. :)

#5 Post by Jerry3904 »

The only one I have was worked out by a some people here a couple of years ago for use in a terminal as regular user (F4):


alias up='su -c "apt-get update && apt-get dist-upgrade"'
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
KernSpy
Posts: 144
Joined: Wed Nov 05, 2014 10:09 pm

Re: This should be fun. Share your alias collection. :)

#6 Post by KernSpy »

Jerry3904 wrote:The only one I have was worked out by a some people here a couple of years ago for use in a terminal as regular user (F4):


alias up='su -c "apt-get update && apt-get dist-upgrade"'
Hi Jerry, that is a good one. I had to "su --help" to check and see
what the -c was for. It is to:

Options: -c, --command COMMAND pass COMMAND to the invoked shell

Thanks! :needcoffee:
MX-19.2_x64 | System76 Galago UltraPro / Clevo W740SU | Intel Core i7-4770HQ | Intel Iris Pro Graphics 5200 | 16 GB DDR3 | Intel 530 series mSATA SSD - 240-GB | WD7500BPKX - 750-GB | Intel HD Audio.

User avatar
DBeckett
Posts: 119
Joined: Sat May 16, 2009 3:59 pm

Re: This should be fun. Share your alias collection. :)

#7 Post by DBeckett »

I've used the same .bashrc for years, mostly to colorize the display.

alias ls='ls -al --color=auto'
screengrab3.png
Gigabyte 990FXA-UD3, AMD FX-6100 hex-core, 3.3GHz, 8G, Radeon HD6570

User avatar
KernSpy
Posts: 144
Joined: Wed Nov 05, 2014 10:09 pm

Re: This should be fun. Share your alias collection. :)

#8 Post by KernSpy »

Thanks .. DBeckett :smile:
MX-19.2_x64 | System76 Galago UltraPro / Clevo W740SU | Intel Core i7-4770HQ | Intel Iris Pro Graphics 5200 | 16 GB DDR3 | Intel 530 series mSATA SSD - 240-GB | WD7500BPKX - 750-GB | Intel HD Audio.

User avatar
Topher
Posts: 82
Joined: Sun Feb 10, 2008 5:37 pm

Re: This should be fun. Share your alias collection. :)

#9 Post by Topher »

I used to have an alias to create a list of all installed software but had to change it to a script so that LuckyBackup would run it when I did my back ups. Others have added on to the original to do the same thing but create slightly different outputs.
dpkg --get-selections > /home/chris/Documents/Computer/My_Sys_Info/MX-pkg-list.txt
dpkg -l > /home/chris/Documents/Computer/My_Sys_Info/MX-pkg-list2.txt
dpkg -l | awk '/^ii/{ print $2 }' | grep -v -e ^lib -e -dev -e linux-image -e linux-headers > /home/chris/Documents/My_Sys_Info/MX-pkg-list3.txt

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: This should be fun. Share your alias collection. :)

#10 Post by anticapitalista »

MX-15 ships with a few by default.

Code: Select all

#apt-get
alias agu="apt-get update"
alias agd="apt-get dist-upgrade"
alias agc="apt-get clean"
alias ag="apt-get update;apt-get dist-upgrade"
Here are some of what I use on antiX

Code: Select all

# inxi
alias inF="inxi -F" 
alias inS="inxi -s" 
alias inW="inxi -xxx -W Thessaloniki,Greece" 
alias inG="inxi -G" 
alias inR="inxi -r" 
alias inP="inxi -plou"
alias inA="inxi -A"
alias inI="inxi -i"
alias inN="inxi -nx"
alias inD="inxi -xx -S"
alias inFx="inxi -Fxx"

# Various
alias df="df -Th"
alias du="du -h -c > sizes.txt"
alias ins="dpkg -l > installed.txt"

#Git commands
alias gfu="git fetch upstream"
alias gmu="git merge upstream/master"
alias gadd="git add ."
alias grm="git rm"
alias gcom="git commit -m"
alias gpom="git push origin master"
alias gstat="git status"
alias gdiff="git diff"
alias glog="git log"
alias gdiffh="git diff HEAD^"

# Creates an archive from given directory
mktar() { tar cvf  "${1%%/}.tar"     "${1%%/}/"; }
mktgz() { tar cvzf "${1%%/}.tar.gz"  "${1%%/}/"; }
mktbz() { tar cvjf "${1%%/}.tar.bz2" "${1%%/}/"; }

# Easy extract
# uncompress depending on extension...
extract() {    
  if [ -f "$1" ] ; then
    case "$1" in
      *.tar.bz2) tar xvjf "$1"   ;;
      *.tar.gz)  tar xvzf "$1"   ;;
      *.tar.xz)  tar xvJf "$1"   ;;
      *.bz2)     bunzip2 "$1"    ;;
      *.rar)     unrar x "$1"    ;;
      *.gz)      gunzip "$1"     ;;
      *.tar)     tar xvf "$1"    ;;
      *.tbz2)    tar xvjf "$1"   ;;
      *.tgz)     tar xvzf "$1"   ;;
      *.zip)     unzip "$1"      ;;
      *.Z)       uncompress "$1" ;;
      *.7z)      7z x "$1"       ;;
      *)
      echo "'$1' cannot be extracted"
      return 1
      ;;
    esac
  else
    echo "'$1' is not a valid file"
    return 1
  fi
  return 0
}
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

Post Reply

Return to “Tips & Tricks by users”