In shells, an alias is an alternate name for a command. For instance, "ll" is an alias for "ls -l" on many systems.

learn more… | top users | synonyms

1
vote
1answer
243 views

How can I force ubuntu to use font A instead font B in all applications and web pages?

i am new in linux, my question simply is: how i can force ubuntu to use font A instead font B in all application and web page? for example there is a web page that uses Tahoma Font, but I want my ...
20
votes
4answers
8k views

How save my “alias” entries forever [duplicate]

I want to save my alias commands forever like the default ones when I type "alias" so I don't retype them every time I leave my bash
6
votes
2answers
528 views

What does the l command do?

There is a command l available on my machine which appears to do nothing. which l also produces no output. Is this a real command, and does it actually do anything?
2
votes
2answers
4k views

Configure hosts file to use aliases

I am running Ubuntu Desktop 12.04 and would like to be able to open a web browser (Firefox), type an alias into the address bar, hit enter, and have the browser take me to the site that the alias ...
0
votes
2answers
95 views

How to make this “svngrep” alias work on “.bash_aliases”?

I added to following line to the "~/.bash_aliases" file: alias svngrep='grep -R $1 ./* --exclude-dir ".svn"' but it's not working. It outputs (in my translation to English): svngrep test grep: ...
0
votes
1answer
340 views

grep bash alias

I try to write grep alias exclude log files alias gr='grep -R --exclude=\*.{log,0,1,2,js} "$1" *' alias gr='grep -R --exclude=\*.{log,0,1,2,js} $1 *' Doesn't work correct I need to make something ...
1
vote
1answer
2k views

Ubuntu alias not applied in bashrc

I am under Ubuntu 12.04 LTS. I have added such line to ~/.bashrc alias myconf="sudo nano /opt/nginx/conf/sites-available/efiling" I tried with single quotes too: alias myconf='sudo nano ...
3
votes
1answer
484 views

Autocomplete on .bash_aliases commands?

I have a whole bunch of aliased commands in .bash_aliases The most generic examples are alias apt-update="sudo apt-get update" alias apt-upgrade="sudo apt-get dist-upgrade" but then I also have ...
1
vote
3answers
429 views

Trouble with aliases and opencv

I have an alias defined to compile an opencv program which goes like this alias gcv='g++ -I/usr/local/include/opencv -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_objdetect' Then I go on ...
0
votes
1answer
309 views

Can I use bash aliases in a keyboard shortcut?

Is it possible to use an alias within a custom shortcut? For example, suppose I have the alias alias cal="google-chrome --new-window calendar.google.com" Can I create a custom shortcut that binds ...
4
votes
1answer
2k views

Aliases don't work after restart terminal

I have create few new aliases in ~/.bashrc then run source ~/.bashrc and it worked. But after restart terminal it does not work. I looked back and found the advice: create ~/.bash_aliases and in ...
-1
votes
1answer
217 views

Linux Mint 11: How to force 'which' results to be updated? [closed]

With command which we can get the pathname which would be executed in the current environment. But when I redefined a command with alias in .bashrc . The result returned by which is still the old one ...
8
votes
5answers
6k views

How to add an alias to a command in terminal?

By typing a manually specified command in terminal i want to do some. How could add an alias to a command? Can i do that with the help of the terminal or should i edit some kind of file?
0
votes
1answer
336 views

How to run alias in background?

Is it possible to run this u2be2mp3(){ youtube2mp3 "$@" > /dev/null;} in background? It's part of the .bashrc, and if I use it this way: "u2be2mp3(){ youtube2mp3 "$@" > /dev/null &;}" I'll ...
2
votes
1answer
128 views

Is there a way to alias the command cd so that it protects the arguments?

When I run cd My folder There is an error because I have not protected the string. bash: cd: My: No such file or directory But this works fine cd "My folder" Is there a way to redefine cd as an ...
7
votes
1answer
646 views

Bash alias -=… (alias name should be a simple dash) not working

I want to create an alias for cd - which should be just a dash (-). I tried without success: alias -='cd -' # bash: alias: -=: Invalid option alias \-='cd -' # bash: alias: -=: Invalid option ...
3
votes
1answer
5k views

Undertanding .bashrc and .bash_profile

On a server when I login as root I see .bashrc (ubuntu 10.10). On my Mac I have a .bash_profile, does ubuntu always have only a .bashrc file and not .bash_profile? (just confused so asking, I realize ...
4
votes
2answers
6k views

bypass the yes/no prompt in apt-get upgrade

in order avoid typing out all of the apt-get commands when updating my computer i have made a simple alias command to do it. But i really want to be able to just type in my alias and let it do its ...
2
votes
1answer
489 views

Why must I do `. .bash_profile` every time I create a new alias?

Every time I add a new alias in my .bash_profile file, I found that I must do the command . .bash_profile in my terminal to make it work. Why does the alias not work automatically?
19
votes
3answers
3k views

How to see the command attached to a bash alias?

Suppose I have an alias in the bash shell. Is there a simple command to print out what command the alias will run?
0
votes
1answer
71 views

How can I trick my system into thinking I have installed a program (gdc)

G-WAN uses gdc to compile D scripts. I'm having problems with gdc for D2 and would like to use dmd instead (They're both D compilers). So what I've done is used alias gdc="dmd" I can now compile D2 ...
15
votes
4answers
20k views

How to run an alias in a shell script?

I have an executable file mpiexec, whose full path is ~/petsc-3.2-p6/petsc-arch/bin/mpiexec. Since I want to execute this command in different directories (without having to retype the entire path), ...
3
votes
2answers
147 views

Batch Starting Servers

How I can create a batch alias for bash? I need to do this: cd /somefolder bundle exec unicorn -p 3000 rackup faye.ru -s thin -E production bundle and rackup - this is 2 servers for example I ...
4
votes
2answers
151 views

How can I create something similar to an alias, that does properly expand to the initial command?

I have set up aliases for apt-get update, apt-get install, and so on. Thats quite convenient. But what I really would like to have is something like this: type agi TAB vi and have it automatically ...
0
votes
2answers
175 views

Start an aliased application from shell passing relative path of a document

I "aliased" a shell command in this way: alias "myapplication"="/home/manuel/myapp/bin/startapp.sh" Now i'd like to pass to it a relative file-path where i am when i execute the aliased command, ...
1
vote
2answers
649 views

alias with parameters

I was recently starting to setup my usual alias. I ended up needing to pass more information than my alias originally needed $ alias runserver = 'python manage.py runserver' $ runserver 80 // turns ...
24
votes
2answers
6k views

Aliases not available when using sudo

I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo: danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' ...
15
votes
6answers
1k views

Which aliases do you find most useful or helpful to your Ubuntu experience?

Since first becoming an Ubuntu user I have developed a growing list of aliases, and there are some that I cannot imagine being without. This makes me think that there are probably still tons of ...
1
vote
2answers
2k views

Differences between fish and bash to pass commandline arguments to alias functions?

From the answers to my other question here i learned about the possibility to pass commandline arguments to a alias function in Bash. In Fish i can edit an alias by editing the file config.fish in ...
6
votes
2answers
959 views

How can I create an alias so that when I enter “kt” it executes “killall gnome-terminal”?

How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?
33
votes
6answers
61k views

How do I create a permanent Bash alias?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a ...
18
votes
5answers
4k views

How can I create an alias for cd and ls?

I frequently run the ls command after running the cd command. How can I create an alias (like cs) for this operation?
1
vote
3answers
6k views

Apache alias not working correctly

I have added these lines in my 000-default virtual host file: Alias /antoniocs/project "/home/antoniocs/www/project" <Directory "/home/antoniocs/www/project"> Options Indexes FollowSymLinks ...
4
votes
6answers
208 views

Overriding a executable to add a default flag

Here's my boggle. I use gmplayer to play all my videos. 99.9% of the time everything works fine but in that 1-in-1000 case, a video might be corrupted. gmplayer plays the video but it cries like an ...