Montag, 16. Mai 2011

how to replace the sudo apt-get install command with sagi

Installing applications with terminal commads is pretty easy and often faster than opening up the software center and searching the application in there.
sudo apt-get install $PACKETNAME
The only hard part is typing sudo apt-get install again and again ;)
If you want to replace sudo apt-get install with a shorter command like "sagi" you have got to download  this script . Now open up a terminal and move the script to your home folder and make it invisible using this command.
mv ~/downloads/pastie-1907126.sh ~/.sagi
Open the file ~/.bashrc with this command:

gedit ~/.bashrc

Add this line to the end of the file:
source ~/.sagi

Restart the terminal and you are good to go! You can now use sagi instead of sudo apt-get install, with tab-completion for package names!

Source

12 Kommentare:

Watchtower Corp. hat gesagt…

tried to install ubuntu 11.04 but i wastn able

Agent 001 hat gesagt…

nice info my friend! I've got an old desktop I wanna convert to ubuntu but don't really have the know-how to do it, any tips?

dende hat gesagt…

If you are really interested in installing Ubuntu i recommend reading this article https://help.ubuntu.com/11.04/installation-guide/i386/index.html ! All german readers should give this Tutorial a shot http://wiki.ubuntuusers.de/Ubuntu_Installation_Natty .

And btw, on my old Desktop PC with a nVidia onboard graphics chip, minecraft runs a lot faster than on the preinstalled windows vista!

Jay Reid hat gesagt…

Awesome, ty

cheshire hat gesagt…

Awesome post man, downloading Ubuntu now!

emosniper hat gesagt…

I don't have enough time for Ubuntu/Linux. Great post though!

Zealot hat gesagt…

Glad I stubbled upon this always want to know more about linux. Keep up the good work.

Javitronic hat gesagt…

Ubuntu rules, but the last version doesn't work in my notebook :(

SNS hat gesagt…

Seems awesome i should try linux

DubbaDeeDoo hat gesagt…

Ubuntu UI is really smooth and clean, I like it. :o

Anonym hat gesagt…

alias sag="sudo apt-get"
alias sagi="sudo apt-get install"
alias saguu="sudo apt-get update;sudo apt-get upgrade"

a strip of my .zshrc ;)
zsh + apt-get = no need for your script :)
but nice article! bookmarked it in case of switching back to bash... ;)

dende hat gesagt…

But tab-completion does not work with the alias, does it? If you can tab complete the packages, your method would be superior of course!

Kommentar veröffentlichen