Questions tagged [alias]

In computer sciences, an alias is a name which usually designates an already-named reference.

Aliases are names used to designate objects, items and settings which already possess a name. In *nix systems, they usually serve as :

  • Hostnames ; a machine possesses a unique hostname, which can be surrounded by aliases. On a Linux system, you can find your hostname by typing hostname, whereas the /etc/hosts file might contain other aliases for the IP representation of your machine on its network interfaces.

  • Users ; on *nix systems, each user has a given name, registered in the /etc/passwd file. However, for some other purposes such as email processing, it might be useful to create aliases for users. This can be done in the /etc/aliases file. (e.g. root is usually aliased as the postmaster).

  • Shell commands ; on *nix systems, it is possible to set an alias referencing a command/program (with possible options and arguments). The most common one is probably ll, which designates ls -l (long list). An alias can be created using the alias (man page) command, and destroyed thanks to the unalias bash utility (man page).

One could also consider UNIX links as an implementation of aliases for files (in the UNIX meaning). See ln for more information (man page).

Each application handles its aliases as it wishes to. Some don't even implement this possibility, and expect the administrator to use the real resources names. Please refer to the applications' documentation for more information on specific cases.

327 questions
107
votes
7 answers

Is it possible to alias a hostname in Linux?

Is it possible to alias a hostname in Linux? It has been asked by jmillikin at various Ubuntu forums as follows: Is it possible to create a hostname alias? Sort of like /etc/hosts, but with other hostnames rather than IP addresses. So that with…
user10178
82
votes
2 answers

How to configure a Windows machine to allow file sharing with a DNS alias

What process is necessary to configure a Windows environment to allow me to use DNS CNAME to reference servers? I want to do this so that I can name my servers something like SRV001, but still have \\file point to that server, so when SRV002…
Michael Ferrante
  • 1,631
  • 1
  • 13
  • 10
54
votes
1 answer

Server Aliases on NGINX

I'm moving a site to a new server running on NGINX. The old site's Apache2 VirtualHost has ServerAlias configured that I want to replicate in the NGINX configuration. From what I've read on the NGINX Docs this seems to be simply achieved with…
Holly
  • 907
  • 5
  • 13
  • 24
53
votes
2 answers

CNAME record/alias in windows hosts file?

Is it possible to enter some sort of CNAME record or alias in the windows hosts file (C:\Windows\System32\drivers\etc\hosts)? Basically I want to forward all requests made to host A to host B, without having to hard code the IP address (which…
MEMark
  • 631
  • 1
  • 5
  • 8
32
votes
2 answers

Confused about alias_maps and virtual_alias_maps

I have already re-read the docs on this as well as other posts here and this is still very unclear to me. I have been testing various things to understand the difference between alias_maps and virtual_alias_maps and I don't see the use of these 2…
Neel
  • 1,421
  • 7
  • 21
  • 35
31
votes
12 answers

How to pass alias through sudo

I have an alias that passes in some parameters to a tool that I use often. Sometimes I run as myself, sometimes under sudo. Unfortunately, of course, sudo doesn't recognise the alias. Does anyone have a hint on how to pass the alias through? In…
Tanktalus
  • 451
  • 1
  • 4
  • 11
23
votes
1 answer

How to override the default dir alias in Powershell?

I wanted to see colorized filenames when I typed dir in Powershell. So, I added the Set-ChildItemColor function from here to my profile file. I also added this line at the end of the profile file to override the dir alias: Set-Alias dir…
Ashwin Nanjappa
  • 331
  • 2
  • 5
23
votes
7 answers

How to use my aliases in my crontab?

I have some commands in my .profile that I want to invoke from my crontab. For example, if I have, alias notify-me="~/bin/notify.pl -u user1" alias notify-team="~/bin/notify.pl -u user1 user2 user3 user4 ...." I'd like to just invoke the alias 0…
Keith Bentrup
  • 699
  • 3
  • 8
  • 19
22
votes
2 answers

No targets available when trying to set alias target from Route 53 to S3

I'm trying to setup a simple Amazon AWS S3 based website, as explained here. I've setup the S3 bucket (simples3websitetest.com), gave it the (hopefully) right permissions: { "Version": "2012-10-17", "Statement": [ { …
22
votes
2 answers

backslash at the beginning of a command

In Installing RVM manual I see a lot of lines starting with '\': Install RVM with ruby: $ \curl -L https://get.rvm.io | bash -s stable --ruby I'd think it is just mistype but they repeat it many times. So what is the reason?
Putnik
  • 2,095
  • 3
  • 23
  • 40
17
votes
1 answer

What is an Amazon Route53 "Alias" DNS record?

AWS Route53 Alias value Consider a domain registered on AWS Route53. HTTP requests to this domain should be served from a AWS CloudFront CDN distribution. In order to achieve this, an alias A record is defined: dig results However, dig results…
15
votes
4 answers

Postfix - do not list domain example.com in BOTH mydestination and virtual_alias

I have a server with two domains. I get the warning as mentioned in the title: do not list domain example.com in BOTH mydestination and virtual_alias Although I receive the above warning, it works just fine without problems. But I want to know how…
cornergraf
  • 481
  • 1
  • 4
  • 8
13
votes
4 answers

Why is my nginx alias not working?

I'm trying to set up an alias so when someone accesses /phpmyadmin/, nginx will pull it from /home/phpmyadmin/ rather than from the usual document root. However, everytime I pull up the URL, it gives me a 404 on all items not pulled through fastcgi.…
Rob
  • 2,303
  • 9
  • 31
  • 50
13
votes
2 answers

Can apache use the Alias directive to fetch a file?

I was wondering if there is a way to use the Alias directive with just one file. Or there was a hack to do this, without having to go into another directory.
Kyle
  • 552
  • 2
  • 5
  • 16
11
votes
2 answers

nginx, alias, php-fpm = File not Found

I'm trying to set up nginx with DAViCal. However, I'm getting a "File not Found" with a "FastCGI sent in stderr: "Primary script unknown" in the log. Looks like something is wrong with my aliasing but I sure can't figure it out. My virtual…
Martin
  • 411
  • 1
  • 3
  • 8
1
2 3
21 22