In computing, an alias is an alternate name for an object, such as a variable, file or device.

learn more… | top users | synonyms (1)

1
vote
1answer
31 views

How to change a program path/alias?

I'm not sure how it works on Linux, but you can type in program names such as ls, man, etc., in any directory and the programs are executed. I uninstalled an old version of ImageMagick and built the ...
33
votes
4answers
11k views

Bash: Spaces in alias name

I am trying to create an aliases in bash. What I want to do is map ls -la to ls -la | more In my .bashrc file this is what I attempted: alias 'ls -la'='ls -la | more' However it does not work ...
1
vote
1answer
3k views

iptables trouble: nat with ip alias (virtual interface) not working

I'm setting up an Ubuntu 11.10 server to act as firewall for a network running several different SSL websites. The idea is fairly common: have all public IP's for each site aliased to the public ...
1
vote
1answer
1k views

ifconfig ignores alias on IPv6

When I add an IPv4 address for the interface eth0:0 with ifconfig, it is created correctly: ifconfig eth0:0 add 192.168.10.10 This can be verified by ifconfig or "ip a". When I add an IPv6 address ...
1
vote
2answers
22 views

Can we use regex in alias command?

I want to create the alias for this command. ssh user@ip as alias [0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9] ="ssh user@$0" I have created it ,but it is not working. Is there ...
3
votes
2answers
79 views

How enter in folder with one command?

I work a lot in two folders: /home/valter/Dropbox/Development/git/valter /home/valter/Dropbox/Development/git/company I would like to create command like: $valter and enter in ...
0
votes
0answers
44 views

Linux bash - Add alias from script without source(-ing) the script

Is it possible to write a script like #!/bin/bash alias foo="bar -options" and get the alias added to the running shell without source(-ing) the script source myscript will work, but just ...
0
votes
1answer
676 views

Workaround for adding forward addresses to Gmail as aliases

I went to add an alias to a forwarded address (managed by GoDaddy, ie myemail@mydomain.com) in Gmail, and I noticed that Google changed their system. In the past, after you entered the name and email ...
3
votes
3answers
624 views

git alias for merging current branch with master

I'm trying to create a git alias that merges the currently checked out branch into the master branch. Specifically I'd want to quickly get my master branch get up to speed with what I'm working on. ...
0
votes
3answers
75 views

create alias for existing hostnames

the question has been asked numerous times but I cannot find a clear answer. I have a database on Azure: gtxxxxxxx.database.windows.net however, to make things more easy (I hate typing) I would ...
0
votes
0answers
39 views

Does Apache Alias supports relative paths?

I'm trying to alias a file with relative path from the document root, like this: Alias /js/jquery-1.9.1.min.js lib/jquery-1.9.1/jquery-1.9.1.min.js It does not work, but I can't find anything in ...
1
vote
1answer
40 views

ZSH Cull Old Aliases

When I call alias in a zsh shell, I get a list of aliases. Some of them are desired, some are not. I originally created a .alias file in my home directory, and added source $HOME/.alias to my .zshrc. ...
0
votes
1answer
42 views

SSMS view designer - how do I give a table an alias?

I'm struggling with getting SQL Server Management Studio to do what I want. Things that were totally simple and easy tasks in Enterprise Manager have inexplicably become hard or impossible. Case in ...
1
vote
1answer
151 views

alias not working with my mongo --eval command

I have the following mongo shell command to delete all users that aren't admins mongo --eval 'db.users.remove({group:{$ne:"admin"}})' collection This works. I want to create an alias for this ...
0
votes
1answer
13 views

How to use aliases for catalogs for file creation navigation

if I have some aliases like Catalog1 (/home/ed/1), Catalog2 (/home/ed/2) I have scripts in Catalog1, and Catalog2 is for output saving, f.e. : python /home/ed/1/one.py > /home/ed/2/log1.txt i ...
0
votes
1answer
47 views

pass arguments to alias then disown

I am trying to create a simple alias: alias draw="pinta &> /dev/null & disown" The intent here is pretty obvious. My problem is that whenever I pass an argument, I get bash: disown: ...
0
votes
1answer
279 views

How to remove zsh alias?

I have an alias which is predefined by an oh-my-zsh plugin. -> % alias gcm gcm='git checkout master' I'd like to remove it, i.e. I'd like alias | pcregrep "\bgcm\b" return 1. I've tried with ...
-1
votes
1answer
87 views

How to copy from couple folders back to the current directory?

I just came to an interesting question in Linux. I want to find a shortcut for copying from multiple folder back in the path to the current path. For example: A/B/C/D/E> cp ../../../example.txt . ...
0
votes
0answers
19 views

How to colorize the output using sed - no GNU tools available

I'm using a short alias in my .profile file to colorize the output of the sdiff command, just to make it easier to spot differences. The alias is like this: alias color_diff="sed 's/[|< |> ...
0
votes
0answers
62 views

Getting error “the account lasse@vkarlsen.no is disabled” when sending email to google groups from gmail

Apologies if this has already been answered but the very nature of the error message, mixing the message with my email makes it nearly impossible to find information about it through Google. I tried ...
3
votes
2answers
92 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
0
votes
2answers
672 views

Unable to create a permanent alias in Mac OS

In Linux I can well to add alias to bashrc and it will become a permanent alias. In Mac OS I tried to do the same thing: vim ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH f or ...
1
vote
1answer
45 views

Echoing aliases to .bashrc

I want to echo an alias straight into my .bashrc file. Here is what I am using: echo alias cdear='cd | clear' >> .bashrc However, the new line in .bashrc does not contain the quote marks. I ...
0
votes
1answer
156 views

bypass 'noglob' for 'which' in zsh?

I want to use the 'which' command to see which executable is actually being invoked, but the defensive 'noglob' aliases keep getting in the way. Is there a shortcut that I can use to find which ...
1
vote
1answer
74 views

ssh port forwarding and multiple aliases

I have the following ~/.ssh/config file: $ cat ~/.ssh/config Host myalias HostName fully.qualified.domain.name Port 2222 LocalForward 3690 127.0.0.1:3690 When I ssh to myalias, ...
0
votes
1answer
472 views

On Mac, why doesn't alias la 'ls -la' work?

When I run alias la 'ls -la' I get the error: ls: alias: no such file or directory How do I alias la to ls -la?
1
vote
2answers
23k views

How do I set an alias name in the hosts file?

I have a production server, on which three different application are running. I need to configure aliases for that server, according to which application needs to be accessed by the user. How do I ...
0
votes
1answer
36 views

Alias not working

I have an alias that does an ssh into a machine and executes 1 line of code as following: alias posts-update= 'ssh user@host.com "cd /var/www/blog/posts && git pull"' This works perfectly ...
-1
votes
1answer
36 views

Remove an alias on Windows 8?

I've set an alias for a command and now I want to remove it again. How would I go about that? I've already tried unalias, but that doesn't work.
0
votes
1answer
24 views

What happens when we alias an IP address to a system?

What happens when we alias an ip addr which is already allotted to some other on the same LAN. Is aliasing local to my system?
14
votes
9answers
10k views

Command aliases in Command Prompt?

How can I make command aliases in Windows' Command Prompt like I would with bash? I found out about doskey in a forum thread, so I can do something like: doskey ls=dir /b ...and now the command ls ...
0
votes
1answer
29 views

Where to put alias commands for use in Windows 7 [duplicate]

I know you can add alias commands in Linux to the .bashrc file, but Window 7 definitely does not use bash. Where and how can I add alias commands for use in the command prompt cmd.exe?
2
votes
4answers
2k views

Linux: aliases when using `screen`

I'm using screen, and I have several aliases in my ~/.bash_profile, for example python=python-2.6. But for some reasons these aliases don't work when I work in screen. How can I make them work?
2
votes
2answers
59 views

alias or function for emacs command?

So I'm on my first day at my new job, and on the server we use, the default emacs is X-windows based. I much prefer using it in the good old terminal, and I'd like to be able to make the command ...
2
votes
2answers
480 views

How can I set up an alias or shortcut to do the *nix find command?

When at the command line, I find that I have to type out this command very often: find . -iname "*php" -exec grep -H query {} \; I'd love to set up an alias, script, or shortcut to make it work ...
0
votes
0answers
19 views

goto inside alias is working only in one way

Why this is not working? #!/bin/csh goto skip_background run_in_background2: echo inside background goto back_from_backgroung skip_background: echo skipped alias run_in_backgroundx 'echo aliass \ ...
3
votes
2answers
2k views

How do I close an OS X application from the command line using a alias defined in my .bash_profile?

I found the following shell script that can be used to tell an OS X application to quit: #!/bin/sh echo | osascript <<EOF tell application "$*" quit end tell EOF I have several simple ...
1
vote
2answers
49 views

Remote login in, creating alias, need advice

I usually remote login to the server at my school. I have a user name and password. The command is 'ssh -l username -p port machineName'. (username is mine, port is a number and machineName is the ...
2
votes
1answer
180 views

How to make an alias to a part of a block device

Is it possible to make a part of a block device to be seen as a separate block device (in a similar way block 'devices' are created for partitions)? Unfortunately, I can't mount it through loop device ...
1
vote
3answers
155 views

How to write alias to use first parameter or * if parameter is blank?

I want to write an alias command for 'ls', so that if I pass in a parameter, then the alias will use it, but if I do not, then it would use '*' instead. This is the alias I have today: alias lsd='ls ...
1
vote
1answer
448 views

My alias isn't working anymore, not sure what happened

I created an alias so that when I type la it does ls -la. When I fire up terminal on my Mac, I get: -bash: alias: la: not found -bash: alias: =ls -la: not found Why would this be? My ...
0
votes
1answer
724 views

Create Command line shortcuts in Windows 7

I'm using jsDoc to create documentations for my JavaScript files. The command I use is > java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js What I want is to create a batch or ...
0
votes
2answers
319 views

Shell function in .bashrc is not recognized

I know this must be something silly but somehow I am stuck trying to create a shortcut (alias) for a shell function. Here is my exact .bash_profile: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source ...
1
vote
3answers
3k views

Syncing aliases via Dropbox and having them work on both Macs

I'm currently syncing my Desktop folder between two Macs using Dropbox. The Desktop folder in my Mac's user folder is an alias to the folder in my Dropbox. This works fine. On one Mac, I created an ...
3
votes
3answers
3k views

Add a static IP alias to a DHCP interface on Windows 8

I have a Windows 8 machine that has only a single Ethernet port. It needs to use DHCP and also needs a static IP. Each IP is in a different subnet, and each serves a different, incompatible purpose. ...
0
votes
2answers
104 views

Setting up an alias that waits for the next prompt to enter a command

I'm trying to set up an alias that connects to an ftp site.. so far (with the help of SO :] ) I've been able to create the alias that will connect. I've tried adding the next command preceded by a ...
2
votes
2answers
275 views

Working shell command doesn't alias

I can run, svn status |grep -v .jasper$ |cut -d ' ' -f8 |sed '/.*\..*/!d' |xargs ls -altr --color=auto just fine. But when I go to add this as an alias (alias svtr="...") I get an error saying... ...
0
votes
1answer
72 views

How to make an alias and work in sh for all users (not in bash)?

My question maybe is silly, but how can I make an alias so as to work in sh for all users? I know that I can put an alias, let say this one: alias ls='ls -l' in /etc/bash.bashrc so as to work in ...
0
votes
1answer
77 views

nested aliases in /etc/aliases: which order?

my /etc/aliases (ubuntu 12.04 lts) already contains some aliases redirecting to root: postmaster: root clamav: root monit: root now I want to add another alias that redirects all root messages to ...
1
vote
1answer
2k views

Alias for multiple sequential commands?

How do I create an alias c that will cd and then immediately ls? alias c='cd; ls' Is there some kind of way to insert a special variable that represents the input? Or is that not the way that alias ...