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

learn more… | top users | synonyms (1)

2
votes
1answer
156 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 ...
3
votes
1answer
582 views

Can I make a custom “directory alias” like '~' in bash?

In bash I can go to my home directory with cd ~ and actually refer to my home directory with any command with ~. Can I make new, custom "directory aliases" (?) to refer to other directories? ...
6
votes
1answer
230 views

I deleted my aliases file, but my aliases are still in my bash session - how can I recover them?

I had a ton of aliases defined and I use them all the time. I have a terminal session open now in which all the aliases are valid and working. However, the .bash_aliases file in which they were ...
0
votes
1answer
117 views

Gnome terminal new tab behavior

I have an alias for cd command that does some additional logic before running actual cd (if you want the details, it activates virtualenv if it finds it in the directory). But when I open a new tab, ...
5
votes
2answers
102 views

Aliases with numerical names

I just installed Oh My ZSH on my Mac. Everything is working great, except I can't define aliases with numerical names. If I execute alias 5="cd ~/Projects/Projectname/" 5 I get the following error ...
2
votes
1answer
65 views

Trying to create bash function which collects and quotes all arguments, but it doesn't work if args contain brackets or single quotes

I saw the following shortcut for "git commit" suggested somewhere: function gc { git commit -m "$*" } This is supposed to allow you to write the commit message inline in the shell, without quotes ...
0
votes
2answers
79 views

How can I automate my usage of three VM machines with the same alias?

How do I automate my usage of three VM machines which require me to add a IP aliased to a name in my HOSTS file. I upload code to the server of choice and then I go to the address http:/ / ...
0
votes
1answer
26 views

how to edit aliases

I just started looking into aliases and I already created a couple aliases before reading how to write alias commands into files so you can easily edit them. If you just directly run the command ...
1
vote
1answer
243 views

Alias defined in .bashrc not working after pipe

I'm stuck with the following problem. I've defined an alias in .bashrc (and .bash_profile): alias echo2="echo" This works well: $ echo2 "test" test However, if I try to use it after a redirect, ...
3
votes
2answers
121 views

Do aliases slow down a shell's start?

Sometimes my shell (zsh) takes longer to start than usual (I open the terminal, and it hangs a bit until I can input commands). I have a few aliases on my .zshrc (well, actually they're in a ...
1
vote
2answers
408 views

Can I have two different users in Windows XP to use the same local profile (user alias)

I need to have two different userIds that map to the same local profile. What I really need is to have to users that are the same one. Is this possible? Thanks!
1
vote
2answers
111 views

Changing the program name displaying on Konsole, using an alias

I have an alias for irssi:alias irssi="screen irssi. When I am running irssi in Konsole, the tab name shows up as "screen". Is there a way to make it display as "irssi"? My tab format on Konsole is: ...
1
vote
1answer
61 views

Alias a protocol to a url

I currently work in an organisation which is mostly Windows users but there are some including myself using Linux here. We have a shared storage drive which we use for sharing files between us and I ...
2
votes
3answers
247 views

How do I make a bash alias that outputs file names in a format I can pipe to vim?

When rebasing with git, I'm interested to open the files that have merge conflicts. I can do this with: vi `git diff --name-status --diff-filter=U | awk '{print $2}'` but if I alias that: alias ...
2
votes
1answer
278 views

OS X: is there an application that can check for broken aliases in Finder?

I use a lot of aliases in my file system. Many original documents are placed in global repositories and I access them by aliases grouped in "tag" folders. Therefore, when I need to delete such a ...
0
votes
1answer
249 views

mac finder - how to open alias in a new finder window

I am doing a video project in which I created a folder with a bunch of aliases to files on various spots on my hard drive, so that I could have references to those files all stored in one location but ...
3
votes
1answer
217 views

How to create alias for - minus sign

I want to map the - to cd - I've tried escaping it, w/ and w/o single/double quotes but neither of them seems to work. alias \-='cd -' or alias '-'='cd -' => bash: alias: -=: invalid option ...
1
vote
2answers
87 views

System-level bash/zsh alias blacklist

Is there a blacklist feature/functionality in bash/zsh to prevent specified commands and such from being overridden with an alias? Specifically - is there something that can be set system-level in a ...
0
votes
2answers
53 views

Disabling sudo halt

It's happened to me a few times now, that I want to shut down my own computer, grab the next best terminal (always have two dozen of them floating around), and type sudo halt, only to realize I've ...
1
vote
1answer
391 views

how to put my arguments into a Bash alias command?

i usually have the following simple alias in my bashrc: alias g="grep --color=always --exclude-dir=\*.svn\*" but now i have to work on systems that only have GNU grep 2.5, hence no --exclude-dir ...
0
votes
1answer
93 views

Ubuntu 10.04 Windows2003 adding a route for GPO assignment

I want the PC's that receive IP from my Ubuntu DHCP3-server to be able to retrieve the GPOs that are on my windows 2003 server. I'm using virtualbox and 3 virtual machines: 1 windows 2003 server ...
0
votes
2answers
333 views

Linux dynamic alias

I am very new to Linux. I just found the alias command which is very useful as I quite often have to dig through log files So I need to regularly open text files they are generally stored in the ...
1
vote
2answers
394 views

Linux: How to automatically detect display and set up default editor accordingly

I am relatively new to linux. I am connecting to a remote linux machine sometimes via telnet and sometimes via NX client for windows. When I connect via telent I would like the default editor to be ...
2
votes
1answer
5k views

How to create an alias in Apache 2 that points to a network share?

I am trying to create an Alias directive with Apache 2.2, to point to a shared folder on other computer. Apache is running on machine M1 at IP 192.168.0.103, the other machine M2, with the shared ...
1
vote
1answer
54 views

How do I set an alias for a search command that takes two arguments

I have a shell command which find files that contain 2 strings together: $ grep -rl JFL . 2>/de/null | while read n; do grep -l 20120907 "$n"; done The strings above are JFL and 20120907 Now I ...
0
votes
1answer
1k views

ifconfig ignores alias on IPv6

When I add an IPv4 address for the interface eth0:0 with ifconfig, it is created correctly: ifconfig eth0:0 add 192.168.10.10 This can be verified by ifconfig or "ip a". When I add an IPv6 address ...
1
vote
1answer
1k views

How can I set outlook web app to send from/send as an email alias?

I have an email account I access through the outlook web app and I have an email forwarder. I want to be able to send messages appearing as from the email forwarder. How can I set this up?
1
vote
1answer
731 views

overriding user defined functions with the same name as system commands

This function exists in one of my users' ~/.bashrc: function rm() { ls $* echo "rm?" read ans if [ "$ans" == 'y' ]; then /bin/rm $* fi } In ...
0
votes
2answers
95 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 ...
0
votes
3answers
777 views

How to make bash aliases available as linux commands?

I have many bash aliases on a remote location. But when I try to run those from my local linux box, I get the 'command not found' error. e.g. $ ssh root@remote 'status' bash: status: command not ...
2
votes
3answers
158 views

In Power SHell set alias cp to cp -v

I have cp for power shell. But I want to use cp in verbose mode without writing -v. So cp should be aliased to "cp -v" command. How to alias cp to "cp -v" in power shell?
6
votes
2answers
788 views

How can I create an alias for apt-get?

I remember that on one Debian system, I used apt install package to install a package. It asked for a password afterwards and was more convenient than sudo apt-get install. Now I am not sure how I ...
0
votes
1answer
84 views

alias: extract options from command

Apologies for the bad title. I couldn't come up with a better one. I want to alias a command to another command, and extract options from the text of the command itself. I realize this is unclear, ...
3
votes
1answer
125 views

How can aliases of a folder be found using cmd?

Is it possible to find the aliases that correspond to a certain folder (and perhaps its sub-directories, too) using Windows cmd? I've tried searching, but it gives me results related to creating ...
0
votes
1answer
116 views

How to get alias working on server that is connected via ssh?

I connect to another server using command: ssh -Y server1 On server1 I add an alias in .bashrc file: alias gousr='cd /opt/user/myuser' When I try to run gousr command at server1 xterm, it says ...
2
votes
1answer
1k views

Can I “export” an alias to the SHELL that invoked a script?

I'm trying to write a utility script that defines certain aliases. My SHELL is tcsh (can't change that). I tried the following #!/bin/tcsh alias log 'less ~/logs/log.date '+%Y%m%d''' Then I run ...
1
vote
0answers
255 views

Dovecot/Postfix-mysql e-mail Aliases are not correctly forwarded

I recently set up Dovecot/postfix-mysql on my Debian Squeeze Server and I have a bit of a problem. When ever I send a email to an alias (foobar@mydomain.com forwarded to foobar@gmail.com for example) ...
2
votes
2answers
237 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... ...
2
votes
3answers
1k views

why alias names defined in .bashrc file are not working?

I have give alias names in .bashrc file like below. But the alias names are not working. why? alias c='clear' alias l='ls -lt' alias h='history' alias d='ls -lt |grep "^d"' export ...
3
votes
2answers
488 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. ...
4
votes
1answer
2k views

Is there a aliases file for sSMTP?

I installed sSMTP for sending emails from command line. I want to create some alias for cron jobs: $ sudo vim /etc/aliases # append this line at the end myname: root $ newaliases ...
0
votes
1answer
28 views

Sharing remote folder in subdir

I want to use a remote shared folder use in a subdirectory. For example the share \somePC\folder => x:\folder\somePCsRemoteFolder is there an easy way to do this ? endo
0
votes
1answer
403 views

create alias to ssh to a server and then connect to mysql

I currently have an alias to connect to a remote server: alias server='ssh user@ec2-00-00-00-000.compute-1.amazonaws.com' I would like to have an alias to connect to this server, and then ...
1
vote
2answers
5k views

How to alias an IP address to make DLNA resource accessible from different IP network

what I have I have a home wifi network 192.168.1.0/24 having DLNA resource 192.168.1.100. I have a TV with ethernet and a netbook with both wifi and ethernet interfaces. I want to make my notebook ...
0
votes
3answers
501 views

How to make an alias for a folder on a mounted drive?

I use parallels to run a windows machine and would love to make an alias in my .profile to make a shortcut to my project folder, but the following alias below dosn't seem to work. alias ...
0
votes
1answer
1k views

Creating IP aliases upon server reboot

I have a server running RHEL 6, and have created multiple IP aliases on it. However, when I restart the server, the IP aliases are gone. I tried to edit the /etc/rc.d/rc.local file to include ...
2
votes
2answers
945 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
322 views

How to set an alias which will automatically ssh to another server

I often use this command to connect to another server with x forwarding: [myuser@server1]$: ssh -Y 10.32.45.123 (10.32.45.123 is server2) myuser@10.32.45.123's password: [$myuser@server2]:$ I ...
0
votes
2answers
298 views

Alias for recursive case insensitive search in current directory

How do I set an alias, such as "mysearch", which will search for a string recursively in the directory I'm standing in. It should be as below: mysearch "this table..." = find -type f -exec grep ...
1
vote
1answer
476 views

In MacOS X is there a way to create a shortcut to a folder on a readonly drive?

I have a partitioned drive with a different OS on my Mac. I can access this drive in readonly mode, but not write mode. There is a folder on this partition drive that I often open, and therefore I ...