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

0
votes
1answer
271 views

zsh aliases doesn't work from .zshrc file

I want to create an alias to mount some remote file systems locally. I placed lines like this in my .zshrc file: alias remfs='sshfs rem: ~/mnt/sshfs/rem' But when I run remfs, I get an error ...
1
vote
3answers
209 views

Alias substitution for a string to use it in a terminal command

Is there a way to substitute aliases such that it is appended or prepended to an existing command in the shell? For example, defining the alias: alias execloc='/home/user/' Prepending this to a ...
1
vote
2answers
130 views

How do I execute a program with default variables?

How can I execute a program (specifically a bash alias) with the default environment variables? Consider this example: export test="something I dont want to exist" alias _xterm='xterm -fn 7x13 -fa ...
2
votes
1answer
213 views

Nonblocking bash commands?

So I just created the .bash_aliases and wrote the following: callNotepad(){ wine C:\\Program\ Files\\Notepad++\\notepad++.exe $1 } alias notepad++=callNotepad Now whether notepad++ is already ...
1
vote
1answer
177 views

Synclient alias in .bashrc not responding

I created an alias to turn the mousepad off with synclient, but it does not respond as expected. After running the synclient touchpadoff=1 in the terminal however, the alias starts to work properly. ...
0
votes
1answer
123 views

Why can't I set up alias for shutdown?

I have edited my .bash_aliases to contain the following line alias shutdown='sudo shutdown -h now' but when I try to run the alias it gives this error message shutdown: illegal time value Try ...
3
votes
1answer
865 views

Bash aliases - how do I run a file in a different folder without losing my current location?

I have a nice little bash alias in my .bashrc folder that allows me to start Tomcat running without having to cd into the folder first, e.g. alias startTomcat="cd ~/apache-tomcat-7.0.34/bin/ ...
3
votes
3answers
842 views

How to run source on terminal start up?

I have alias ready on .bash_aliases. Problem I'm having right now is that I need to run source ~/.<filename> first before I can execute the alias command. My question would be how do I run ...
2
votes
2answers
8k views

Apache Alias Folder: 403 Access Forbidden

Ok, I have set up an alias on my apache server to point to a directory on a second HD. The Directory is /media/MediaServer/Videos. The point of all this, is to stream videos from that folder, to my ...
18
votes
1answer
19k views

How to remove an alias?

I want to remove gs alias from my PC. When type gs it will open the Ghost Script. But I checked everywhere in the home directory .alias .bash_aliases .bashrc I also overwrite the gs with my custom ...
1
vote
1answer
101 views

“Trash” equivalent for 12.04

I recently updated my Ubuntu version to 12.04. I have aliased rm to the command trash, and now that I have upgraded, there is no longer a command called trash. Is there an equivalent for 12.04? I ...
-1
votes
2answers
57 views

bash script isnt working

I have written this simple type alias script in my bin dir in home #!/bin/sh alias kp='ls –L' alias ldir='ls –aF' alias copy='cp' and saved it in the name myenv.Then I have changed the mode using ...
1
vote
2answers
360 views

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .bashrc that looks like this: ls() { if(some ...
1
vote
1answer
336 views

Bash alias permanent <without running bash or . ~/.bashrc>

I'm used to putting my alias in .bashrc, but Ubuntu suggests putting them in .bash_aliases. So that's fine, I put my alias there in the .bash_aliases file. However I want to run my aliases once I ...
4
votes
2answers
132 views

Create alias with paramater in the middle

I want to create an alias for grep like this: grep argX ~/myfile where argX is a parameter and myfile is always the same. How can I do this?
3
votes
1answer
260 views

Why doesn't this command work as an alias?

I've been using the following command to list the ten largest files, at any depth, under the current directory: find -type f -size +10M -exec ls -gGsSh1 {} + | awk 'NR<=10 {print $0}' (I use awk ...
2
votes
2answers
131 views

How to add a password option in CLI?

I've googled extensively but haven't found how to add a password option so I don't have to type it in manually. I've created the following alias: alias int='sudo service network-manager restart' ...
5
votes
2answers
5k views

How to protecting cd command to deal with parentheses?

I asked here how to make cd protect spaces. Tab completion is great, but sometimes you paste the path from the clipboard so this is useful. The solution breaks with parentheses however. No matter how ...
1
vote
1answer
2k views

Using alias to change ls to ls-l changes(or disables) the colors of ls output

I've used alias to change ls to ls -l, but the colours change to the normal font of the terminal (also tried ls -l before the alias command and the colours appeared fine). What is wrong? Thank you
0
votes
2answers
2k views

Why is setting alias in .profile not working?

I have this as the last line in my .profile: alias gl="cd /home/jrenner/glances/glances" yet even after reboot I get command not found when typing gl. What is happening? I am logged in as the ...
0
votes
1answer
716 views

access to usr/local/bin

My question is this. I have a jar file that I want to be able to run from command line with a simple command. So in my ~/.bashrc file I created an alias like so: alias selenium='java -jar ...
3
votes
1answer
246 views

Saw an interesting command but can't alias it

Saw an command from this post http://askubuntu.com/a/266839/75967 that I would like to alias find {,/usr}/{,s}bin -printf '%f\0' | xargs -0 whatis | sort | less I assume the less or the | is ...
2
votes
1answer
61 views

Alias adder script in terminal

Recently i was adding some command aliases to .bash_aliases file in user home folder. I am wondering if there is some script that i can run to add aliases to that file. What I mean is : some script ...
0
votes
1answer
169 views

How to partition while installing Ubuntu 12.10 [duplicate]

I have 320 GB hard disk. I want to create like Windows partitions like C drive for OS install. and D,E for store other files. I try this already. but that is partitioned as like USB flash drives. ...
6
votes
3answers
3k views

Is there a way to echo an alias?

I have set some aliases in my .bashrc file and for some reason one of them does not behave as expected. Since I don't remember the exact command assigned to that alias, I would like to see the ...
4
votes
2answers
370 views

Working directory when running command

I've got an executable, let's call it exec. It lives in a directory, for the sake of argument called dir. Let's say it's at the filesystem root. I can run this executable by doing cd /dir ./exec ...
3
votes
1answer
258 views

When I open Terminal it says command alias not found and closes

I was messing around in Terminal (bad idea, I know, but I'm usually pretty good with it) and now it does what the title says. I know about pressing Control-C to stop it from running, but how do I just ...
2
votes
2answers
1k views

trying to create an alias in Ubuntu 12.10 but its not working

I am trying to create an alias and I have added these lines in ~/.bash_aliases alias server-python='open http://localhost:8000 && python -m SimpleHTTPServer' alias ssh-saad='ssh ...
2
votes
1answer
384 views

How to make ubuntu understand a windows-style folder path as a folder on windows partition?

I have ubuntu and Win7 on dual boot. On windows, a use a program that is set to save things on a given windows folder (like "D:\some folder"). On ubuntu, I can run this exact same program (it's not a ...
4
votes
1answer
342 views

How to run some alias command in bash's non-interactive mode

I want to run some alias command in bash's non-interactive mode. But seems Ubuntu ignore BAHS_ENV. How can I make it work? la is a alias command. And I tested in other linux. it is work fine. Just ...
3
votes
1answer
207 views

Aliases - able to pass arguments?

I want to make an alias in my .bashrc or .bashrc_aliases file (probably the latter). Specifically, I want to call the clang command for my *.c file I'm writing. What I'm looking for is best summed up ...
1
vote
0answers
91 views

Alias apt-get to apt-fast? [duplicate]

Possible Duplicate: How to get apt-get to call apt-fast? I use apt-fast, but often find myself copying commands from the internet, these all use apt-get. I am wondering if it is possible ...
1
vote
1answer
406 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
13k 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
8
votes
2answers
780 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
6k 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
101 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
419 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 ...
3
votes
1answer
3k 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
669 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
611 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
470 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
219 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 ...
11
votes
6answers
13k 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
509 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
140 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
894 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 ...
4
votes
1answer
6k 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 ...
9
votes
2answers
10k 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 ...