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

learn more… | top users | synonyms (1)

0
votes
0answers
4 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
3 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 ...
2
votes
2answers
43 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
57 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
23 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
36 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 ...
0
votes
0answers
14 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
32 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
2k 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 ...
0
votes
1answer
396 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
20k 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
22 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 ...
-2
votes
1answer
28 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
23 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?
12
votes
9answers
8k 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
22 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?
1
vote
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
56 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
389 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
18 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
33 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
152 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
88 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
402 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
705 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
158 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
1k 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
93 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
231 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
68 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
56 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
1k 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 ...
1
vote
2answers
57 views

Alias for directory using a symbol

I'm looking to set up an alias for my work directory, which can change as I change context, and I was trying to find something that was short enough to stand in as a replacement for ~. I'd be tickled ...
1
vote
1answer
46 views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
3
votes
4answers
5k views

Under Ubuntu, how can I place a shell alias command that will be global to everyone?

Under Ubuntu 9.10, where can I place an alias command that will be valid to all users, root or otherwise, and that will work with a shell under GNOME as well as an ssh session and plain console login ...
8
votes
5answers
5k views

IP address alias assigned by DHCP

I would like to create several aliases to eth0, but have the addresses assigned by DHCP instead of being set to static IP's. Is this even possible? All the examples I've seen assign a static IP using ...
2
votes
2answers
889 views

Bash alias with piping

I'm not exactly sure what I'm doing wrong with this one. I'm trying to run the command alias localip='ip -4 -o addr show eth0 | egrep -o '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}' | head -n 1' If I ...
0
votes
0answers
45 views

How to read aliases in a ksh script

I have some global aliases defined in my ~/.profile file. To read them from a bash script, I'd use: shopt -s expand_aliases source ~/.profile However, in ksh this does not work because it does not ...
2
votes
2answers
146 views

Is this alias any useful?

I am going through and old .cshrc file and it contains the following alias: alias pwd 'echo $cwd' How is that useful? I used to think that this is how pwd might have been implemented. But looks ...
2
votes
1answer
78 views

What's the rule on using the word “git” as an alias?

I used to keep my git aliases in a file outside of my .gitconfig file, in the normal format of: alias gb="git branch --verbose" which worked great. But, after looking around at others' dotfiles, I ...
0
votes
0answers
35 views

Device not found after adding a network alias

Interface em1 works fine. I issued ifconfig em1:0 1.2.3.4 followed by > ifconfig em1:0 The error is 1.2.3.4 error fetching interface information: Device not found CentOS 6.4. What gives? ...
0
votes
1answer
88 views

How to add network aliases in Linux for network computers

In Windows, the c:\windows\system32\drivers\etc\hosts file lets you add aliases to IPs so you can remember those computers with a familiar name. Here's the header of the HOSTS file, for example ...
3
votes
2answers
473 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. ...
1
vote
1answer
852 views

Create alias (desktop shortcut) of an application installed by Macports

I just installed Dia using macports. Now, I need to place the shortcut in the Apps folder and also make the executable available in the Spotlight search. How can I do that?
1
vote
1answer
84 views

Is it possible to alias regexp substrings in vim?

I want to find and replace pattern containing floating point numbers using vim. I found this nice regular expression for such numbers: [-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)? This expression makes ...
0
votes
3answers
111 views

Create alias or add path?

I've just installed a new program (let's call it foo) on my Linux machine. The program's files are in an unusual location that is not currently part of my $PATH. If I would like to be able to easily ...
0
votes
2answers
88 views

Use the result of 'whoami' as part of an alias

I am setting up my default .bashrc on my Ubuntu machine that I will soon be adding more and more users to. One command that users will have access to is mysql, logging them into the SQL system on the ...
4
votes
3answers
3k views

How to alias a hostname?

Is it possible to keep a network alias - without specifying the IP address in the hosts file? For instance, I have abcd.efgh.com but want abcd -> abcd.efgh.com so that ping and ssh work as they ...