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
1 answer

Set alias from sh script in ESXi 6

I have created a simple script to setup an alias on an ESXi 6.7 host: #!/bin/sh alias ll="ls -la" echo "Profile done" When I run the script I see the echo'd message on screen, but the alias is not set. But if I execute the alias command from a…
TSG
  • 1,674
  • 7
  • 32
  • 51
1
vote
1 answer

Postfix virtual_alias_maps won't work

I have the following entry in virtual_alias_maps: ttt@works-organizer.ch: tibor.nagy@works-organizer.ch However if I send an email to ttt@works-organizer.ch, it fails with User unknown in virtual mailbox table: Jun 25 21:53:50 zg-3…
Tibor Nagy
  • 197
  • 1
  • 11
1
vote
1 answer

Why isn't my Nginx alias directive working?

I'm using Nginx on CentOS 7 with Ruby on Rails / Puma. I would like for certain file paths to be skipped by RoR and be served directly by Nginx. I created this in my "server" block for my site location /assets/lib/ { alias…
Dave
  • 185
  • 1
  • 7
  • 20
1
vote
1 answer

NGINX PHP FastCGI multiple locations (alias) issue

First time posting and very new to all this - was advised to try here over stack overflow and have read a few different things linked but just cannot get my head around it. After alot of trial and error and looking my location blocks currently look…
PBX
  • 11
  • 4
1
vote
1 answer

Autoindex cuts off end of directory path; workaround needed

I'm trying to set up a sort of shared hosting with nginx where each user has a public_html directory. Requests to /~username are aliased to /home/domain-users/username/public_html. Problem is, I also want autoindexing enabled. With the config below…
user48147
  • 203
  • 2
  • 7
1
vote
0 answers

Postfix: multiple aliases for same mail address from multiple results

I am about to configure our new mailserver and one feature must be that mailinglists must be delivered to multiple receipients as well as to an internal shared imap folder. we store most of our users and configuration in a ldap directory. every user…
Tobi
  • 237
  • 3
  • 12
1
vote
1 answer

shell : warn about or deny command execution with help of an alias

executing iptables -F is very dangerous if your default policy for one or all chains is DROP I would like to use an alias in bashrc like alias iptables -F="echo \ 'WARNING: due to the DROP default rule, flushing all rules would lock you…
MarkHelms
  • 181
  • 5
  • 16
1
vote
2 answers

Execute local alias through ssh on remote server

I know I can execute a function through SSH on a remote server like so: $ ssh remote_server "$(declare -f cool_function); cool_function" I also have some aliases that I would like to execute on remote servers without having to define them on any…
MauricioRobayo
  • 152
  • 1
  • 14
1
vote
3 answers

Setting up DNS records

Hi i have a question about managing DNS records. Lets say i have a single server that contains an IIS server and an SQL server. A friend of mine has suggested that i have a single A record that points to that servers IP address and setup 2 CNAME…
Grant
  • 189
  • 1
  • 6
1
vote
0 answers

Alias hostname and file path

Is it possible to mask the hostname with an Alias and variables? For example: I would like to call http://easyNameToRemember/path/to/file instead of: http://uglyServerName:8000/the/real/path/to/file Basically, 'easyNameToRemember' would hold the…
1
vote
1 answer

Same Postfix aliases for different domains

I've got Postfix managing two different domains one.com and two.com, included in the my destination variable of the main.cf file. I need an /etc/aliases file including something like this: user@one.com: foo@three.com user@two.com:…
auino
  • 143
  • 7
1
vote
0 answers

Postfix: forward email to non-local address - expanded from user unknown

I'm running into issues with postfix, specifically while creating a local virtual alias to forward email to external addresses (on other servers). My goal is to: Forward all email sent to fwd@xyz.com to final-address@external-server.com (virtual…
TCB13
  • 1,166
  • 1
  • 14
  • 34
1
vote
1 answer

How to configure an alias in nginx

Im switching from apache to nginx and im not sure how i would do the following in nginx. ServerName example.com ProxyRequests On Alias /faq /var/www/http Options Indexes FollowSymLinks …
Gaz
  • 11
  • 1
  • 2
1
vote
1 answer

File in the same subdirectory as the HTML in CMS

I have a CMS installation with a link such as journal.org/archives/volume136/number10/37362-49383 I want to place a few PDF files in the same directory as the above HTML such that the PDFs are accessible from…
1
vote
1 answer

Why nginx alias returnes 404 on .php files?

This configutation works: location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass…
littleguga
  • 166
  • 1
  • 7