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

postfix loops back to myself email issue (was working before apt upgrade Ubuntu)

Everything was working normal till apt upgrade on Ubuntu 20.04 LTS, don't even remember what was upgraded, just routine, didn't change any config... I really tried to fix, searched, but I don't know what to do... The ERROR: Jun 9 23:47:40…
Yonathan
  • 103
  • 2
0
votes
0 answers

Bridged network with multiple alias in Debian

I'v been trying to setup a bridged network with multiple IP addresses for a few days but I cannot get it to work. I'v tried multiple different setups found here on stackoverflow. Here is my latest that seems to be working for alot of other people,…
0
votes
1 answer

Docker container unable to connect to postfix on host with error "MX Routing not available"

I'm trying to run a SimpleLogin instance on my raspberry pi 4 (aka armhf/armv7l) following the official instructions, but the resulting installation isn't able to send emails to my real inbox. I installed swaks inside the docker container sl-app…
0
votes
1 answer

nginx - subfolders alias include all subfolder

I'm currently trying to fiddle around with a location block that has a different root. However I have some issues when accessing files that are in a subfolder on the different root. Here is my broken location block and below it I will explain the…
Aebian
  • 23
  • 6
0
votes
1 answer

Apache2 : 2 php versions in the same VHOST

I am migrating my app from PHP 5.6 to php 8.0 by having a front controller redirecting to my legacy app or my new app depending on the uri. I tried with alias and it works but I need to keep the exact same host for both and no…
deuterium
  • 1
  • 1
0
votes
1 answer

Apache alias - Ignore alias for specific files

I'm currently working on a new project related to another one, the old one. This old project let user uploads avatar, resulting on non-versionned files in /images/avatars. But in the new project, I need these avatars files too. So I took the avatar…
0
votes
1 answer

Location in Nginx doesn't work as expected

Here is https://site.io, it's based on Wordpress. It is located in /var/www/site.io. I need to add https://site.io/guides and put a fresh Wordpress engine there. I've added this location to site.io nginx config: location /guides { alias…
Humanoit
  • 1
  • 1
0
votes
1 answer

How to set a command alias that will be respected in a shebang

I run multiple versions of PHP on my Linux server. I've added an alias in my bashrc to point the php command to a specific version alias php='/usr/bin/php7.3'. This works as expected when I execute a PHP script actually using the php command eg php…
Dom
  • 458
  • 1
  • 5
  • 15
0
votes
3 answers

alias command that works in ssh too

I have some commands that I always use and they are rather hard to remember such as lsof -i -P -n | grep LISTEN. I would like to create an alias for them that also applies when logged in via ssh on another server. Is this possible?
Romeo Mihalcea
  • 522
  • 1
  • 9
  • 27
0
votes
1 answer

AllowOverride not working for alias'd site

I have a two domains johny.com and alice.com and one webserver (apache) managing them. Web files are in /var/www/johny.com and /var/www/alice.com and are configured as two virtual hosts with proper ServerName and DocumentRoot. Now Alice wants to…
Zereges
  • 105
  • 2
  • 12
0
votes
1 answer

assigning aliases in .bashrc via echo '...' >> .bashrc

running cat .bashrc gives me these two lines at the end: alias remove='rm -i' alias chamber='ls -a -i -l' when I run remove followed by a file name I get a successful removal with confirmation prompt. when I run chamber I get chamber: command…
Joel
  • 1
0
votes
1 answer

Aliasing Server Name in SSH Command

This may be trivial, but I am not sure how do it safely and optimally. I have a few servers (AWS EC2) into which I ssh from the bash. Those server names are long. How can I alias them, so instead of typing the long thing, I can type something…
MadPhysicist
  • 133
  • 8
0
votes
1 answer

DNS Aliases of multiple domains in win2k8

I have set up a AD integrated server deploying also the role of DNS server. What I want is to put an alias for a specific host of my domain, putting an alias (CNAME) different from the domain name (for example, if the domain is www.mydomain1.com,…
dbekiaris
-1
votes
1 answer

SSL certificates and DNS CNAME

I am wondering if an SSL certificate would work and be accepted in the following circumstances. In each of these circumstances, one DNS name returns a CNAME record for another DNS name, and the client is connecting to the server based on the alias…
user553702
  • 121
  • 1
  • 5
-1
votes
3 answers

Getting hostname on CentOS 6.6 from command line

In the command below, I'm trying to get the hostname of the server I'm logged into. Please note that I'm on the actual server and not ssh'ed into another server!! I'm trying to get the hostname. Our server administrator was telling me the…
JustBeingHelpful
  • 1,964
  • 7
  • 37
  • 53