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.

332 questions
1
vote
2 answers

snow leopard (osx): sudo preserving environment

Greetings, I would like to preserve my aliases after sudoing on OSX: sudo -s . .profile Is it possible to achieve this on a SINGLE command line? - i.e. something like: sudo -s ; . .profile tks
jbastos
  • 265
  • 1
  • 3
  • 9
1
vote
1 answer

Using network drive as alias in Apache 2.2 is not working

OS is Windows 7 Appache is installed in "C:\AppServ\Apache2.2" In httpd.conf for documentroot DocumentRoot "C:/Program Files (x86)/myweb" for alias: alias /link/ "\\xxx.xx.xx.xx/myfolder/logs"
1
vote
1 answer

Serving additional directory content under root in Nginx

Using Nginx with Django, I have the following location entry in my server config: location / { include uwsgi_params; uwsgi_pass 127.0.0.1:1234; } Thus, all root URL requests are passed to Django. Now, I'd like to serve some additional…
1
vote
0 answers

"Deny from all" not working

I have made following configuration on httpd.conf. But, any IP still can access PHPMyAdmin URLs/aliases. What have I missed? Is this related with "Alias" directive? Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin…
1
vote
1 answer

Directory alias vs variable in profile

What are the advantages of aliasing a directory (in my .profile) as opposed to setting a shell variable to it (and exporting of course). alias MY_DIR=/usr/local/data/test/ vs MY_DIR=/usr/local/data/test/ export MY_DIR
C. Ross
  • 3,075
  • 9
  • 35
  • 36
1
vote
0 answers

Host name alias resolves to different computer in network

I have an alias 'DATA-SERVER' for many machines in my network. When I try to access DATA-SERVER from a computer (say Computer A), it resolves to some other Computer C and not to A itself. How do I possibly resolve this? To add the host alias, I…
Raghav
  • 11
  • 2
1
vote
1 answer

ISC DHCP Server listening on virtual interface

I've got an ISC DHCP server 4.2.2 (Debian Wheezy) working. I need to add a second scope for unknown clients that gives them a bogus address (mostly for troubleshooting purposes). However, nothing I try seems to work. Truncated dhcpd4.conf file below…
user2891127
  • 181
  • 2
  • 12
1
vote
2 answers

Postfix using virtual.db file instead of mysql table

I have specified virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, but still I got errors like warning: hash:/etc/postfix/virtual is unavailable. open database /etc/postfix/virtual.db: No such file or directory If I create the…
asmisha
  • 21
  • 1
  • 5
1
vote
1 answer

DNS CNAME Record windows 2003 R2 server by IP address

I am trying to add a CNAME record to point to an ip address. I have added the CNAME record to the primary DNS server that looks like this: foobar Alias(CNAME) 192.168.50.11 I restarted the DNS server service. When I ping the new name I get the…
Tony
  • 548
  • 1
  • 4
  • 7
1
vote
1 answer

Issue with SSH Aliases and Tunneling

I want to connect to server B which is behind a firewall, using AliasForB. I SSH to server A first, and then from there I can SSH to server B. I am attempting to connect directly to server B by typing shorthand "ssh AliasForB". Both A and B require…
Ryan Rosario
  • 225
  • 2
  • 9
1
vote
2 answers

apache 2.4 + php-fpm + mod_proxy_fcgi + alias

I have the following config: Apache 2.4, php-fpm, mod_proxy_fgci. The problem is that my config is not working with the alias directive: I've installed phpredmin, but the alias directive is not working with ProxyPass. Can someone push me in the…
Carl
  • 111
  • 1
  • 1
  • 5
1
vote
0 answers

command line alias inside php exec

Is there any possibility to define shell alias for commands executed via php system, exec etc functions? I'm running multiple versions of PHP using fastcgi and I need to run the right version of PHP when I execute exec('php -f script.php'); inside…
Peter Krejci
  • 123
  • 5
1
vote
1 answer

Postfix: Two domains in mydestination - where are the mails delivered to?

I have two domains in the mydestination parameter of Postfix: mydestination = foo.com, bar.net The MX-Records for foo.com and bar.net are set to mail.foo.com. In my /etc/aliases I map admin to the user john admin: john When I send mails to…
horen
  • 411
  • 2
  • 7
  • 22
1
vote
1 answer

Postfix: virtual_alias_maps delivering everything to one user despite new domain

I have a postfix installation handling mail for a couple of domains, for which all mail goes to one real local user (cmb), and I want to add a new domain (let's call it example.org) for a second user, but everything is being delivered to cmb. Here…
Chris Boyle
  • 131
  • 1
  • 7
1
vote
2 answers

permission denied using sudo

I have an alias in my .bashrc file that runs an executable python file like so: alias my-command="sudo -u apache /path/to/file.py" When I run my-command It prompts for my sudo password and then it runs the .py file. However the python script writes…
ajon
  • 309
  • 4
  • 11