In shells, an alias is an alternate name for a command. For instance, "ll" is an alias for "ls -l" on many systems.

learn more… | top users | synonyms

5
votes
2answers
44 views

How to get [TAB] to work with arguments of aliases to autocomplete as can be done with the actual command

I have many aliases that I created in my .bash_aliases file, and they are very useful, so if I want all info on a package I do something like: allinfo software-center And that does the equivalent ...
3
votes
2answers
277 views

How to stop the first command the failing to affect the second command

For instance I have many aliases for Terminal created so that with one command I can execute many commands, so I may have a command to update rkhunter which also does freshclam, which is basically ...
1
vote
1answer
33 views

Writing an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date

I am trying to write an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date the command is run. Preferably in format "YYYYMMDD FolderName Backup". E.g. ...
0
votes
1answer
21 views

Alias syntax for mpirun

I execute my jobs in terminal using: mpirun -np 4 lmp_fedora < in.stdinfile Now I want to create a permanent alias run so that I can just input the command: run < in.stdinfile from any ...
2
votes
1answer
59 views

Alias and executable file [duplicate]

I have lmp_fedora executable file located in /src. I use this command: mpirun -np 4 lmp_fedora < in.stdinfile to execute the job. However it is only able to run if I copy lmp_fedora into the ...
7
votes
2answers
88 views

Is it possible to make sandwhich aliases?

I'm looking for a way to make the following alias work for any file name. alias dim='cd /home/jason/Documents; vim *the desired file*; cd' I'm wondering if there is a way I could change this alias ...
0
votes
0answers
24 views

How do I : Set up Folder Alias configurations to html page links - Apache2 (2.4.n)

In my ..\apache2\sites-available\000-default.conf I have: ScriptAlias /cgi-bin "/usr/lib/cgi-bin/" <Directory "/usr/lib/cgi-bin/"> AllowOverride None AddHandler cgi-script .gbw ...
5
votes
1answer
35 views

Help with Alias [duplicate]

I frequently use: find /home -iname foo* 2> /dev/null The 2> /dev/null suppresses any permissions issues and leaves legit matches. I tried creating: alias lost=find /home -iname ${1} 2> ...
3
votes
2answers
194 views

Can alias command pass arguments?

I want to know if i can pass an argument with an alias command. for example: alias d="dmesg|grep -iw usb|tail -5" Now d will print the last 5 lines. if i want to use d to print a different number ...
-1
votes
1answer
31 views

Execute sh script using alias

I've written a script to run intellij idea using alias and put it in bashrc file. function idea { sh /opt/idea-IU-135.909/bin/idea.sh } Then i am trying to run it through terminal and get ...
1
vote
1answer
24 views

Problem while trying to create an alias

Goodmorning I was trying to create an alias so as to launch matlab easier. I read this post :How to create a permanent "alias"? and I used the commands in this line echo "alias ...
2
votes
1answer
29 views

antlr4 alias not persisting

I'm trying to set up Antlr 4.5 as per the instructions here but the alias isn't accessible from where I've put my project after a reboot, which makes me wonder if I've done the classpath step ...
1
vote
1answer
48 views

How to create log file from a command (through alias)

The call is simply ud typed in a terminal. ud is defined as the following in my ~/.bash_aliases: alias ud='sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade ...
0
votes
2answers
59 views

aliases not picked up when sudo in mac? [closed]

I have the following aliases in /etc/profile. # System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; ...
1
vote
1answer
15 views

Access a directory using its alias

I have created an alias for a path that I use often like that: alias example='/home/user/directory/' (in the home/.bash_aliases) The problem is that I want to access that directory via terminal ...
0
votes
0answers
40 views

Why doesn't my nvidia driver module get aliased to just 'nvidia'

I have nvidia-346, nvidia-346-dev and nvidia-346-uvm installed (on my Kubuntu 14.04). For some reason, the modprobe.d file this installation create does not alias 'nvidia-346' as just 'nvidia'. Why? ...
7
votes
1answer
159 views

How can I preset aliases for all users?

I have Ubuntu 14.04.2. I want to make it so all users automatically have a specific set of aliases. I have my aliases set in my personal .bashrc, but I don't want to have to manually copy them into ...
0
votes
1answer
54 views

Permanent command alias

I want to create permanent alias for running some long comments of Django, for example for running django server now I use: $ cd test/ $ . bin/activate $ cd project $ python manage.py runserver 4321 ...
0
votes
0answers
82 views

Add an aliased interface eth0:0 to my wireless bridge

So, I have internet access being shared with iptables MASQUERADE to my wlan0 (hostapd). I have my eth0 with dhclient to have internet. I wanted to add eth0:0 to the internal subnet. As soon as I ...
0
votes
4answers
115 views

Shouldnt .bashrc run every time I log in?

Newish to Ubuntu so forgive if I word things oddly... All I really want to do is have my ls command changed to ls --color=always -ragX Got that solved... Alias will do nicely. Now, to have that run ...
0
votes
1answer
43 views

How would you define a function or script within your path that takes arguments to name the file?

I am learning about the alias command in an online class. I am also interested in ffmpeg. I figured what if I typed an alias, then I wouldn't have to do all of that typing and remember the commands. ...
1
vote
1answer
62 views

Alias for gnome-open to open different files

I want to make alias for gnome-open so I be able to open files with command opn somefile.doc How can I pass filename with this alias?
0
votes
0answers
24 views

How to run an alias command with sudo [duplicate]

I created an alias called runmc that allows me to start up a java program. But I noticed that when I type in "sudo runmc" (It needs root access to work properly.), it will display "runmc: command not ...
0
votes
3answers
86 views

How would I create an alias to run a game? (Minecraft)

I would like to create a command-line alias to run a game (Minecraft in particular). How would I accomplish this? I want to type in runmc to run the command java -jar /root/.minecraft/launcher.jar. ...
0
votes
3answers
114 views

Shortcut to execute shell scipt? [duplicate]

I'm trying to create a shortcut that will run a .sh file deep in some directory without having to navigating to the absolute path. I have tried using aliases, which did not work as. Using soft/hard ...
1
vote
1answer
69 views

Altering command to start application by mouse click - how to

I have Google Earth installed on my Ubuntu 14.04 (Trusty Tahr) and, in order to display clamped polygons on it, I have to start it with the command LIBGL_ALWAYS_SOFTWARE=1 googleearth. I would ...
0
votes
0answers
91 views

Give aliases to rooms in Empathy?

I join a XMPP server from Empathy (via Jabber), and I can manually join groups via names like group-1 and group-2046. The groups on this platform have actual names though (so group-2048 could be ...
1
vote
1answer
876 views

How do I add an additional IP address to an interface in Ubuntu 14

I want to have the wired interface simultaneously obtain a DHCP address, and also alias a fixed address so I can communicate with a device with a fixed IP address on a different subnet over the same ...
3
votes
2answers
52 views

How to correctly deploy/install scripts?

I've developed several utility scripts that solve specific problems of my team's day-to-day work. Until now what I have done to deploy the script in my co-workers' laptops is as follows: Every ...
1
vote
2answers
498 views

Location of “~/.bash_aliases”

I want to make permanent aliases in Terminal, and I have read this answer on how to do it: http://askubuntu.com/a/5278/364819 But I have got a small problem, I have found the code: if [ -f ...
0
votes
0answers
93 views

How to use .profile alias in crontab

I've read the answers to this question, but still don't understand what to do: http://serverfault.com/questions/119273/how-to-use-my-aliases-in-my-crontab I am logged onto my Ubuntu server as root. ...
0
votes
0answers
51 views

Bash puts ':' after each command

I updated my bash_aliases from another system I own, and now, I have found the following problem: If I use a command, bash put : after each command and alias. Why? What can cause this problem? In ...
3
votes
1answer
279 views

Create multiple aliases for localhost addresses on different ports

I have some webapps running on my localhost that I can access by my web browser at different ports. For example I have an IPython notebook server running on port 8888 (I can access it at ...
0
votes
1answer
37 views

autoremove option doesn't work with apt alias

I have set up an alias for apt-get as apt, for convenience. This works fine, I can do sudo apt install PACKAGE sudo apt remove PACKAGE sudo apt update etc with no issues. However, the autoremove ...
2
votes
2answers
102 views

Install program with different run name

I recently installed gfortran with apt-get install gfortran, but it turned out to be the latest version 4.9, which is not compatible with software that demanded gfortran in the first place. So I ...
0
votes
1answer
645 views

Problem setting alias, ~/.bash_aliases file not found [duplicate]

I was trying to setup a permanent alias. but ~/.bash_aliases file not found on my system. I have checked the bashrc file and it shows bash_aliases are enabled. I tried creating a new file in the same ...
0
votes
0answers
23 views

Aliases don't work [duplicate]

I can't get this to work at all. I am running ubuntu 12.04 in virtual box and am trying to follow this tutorial. I have realised that I have .profile not .bash_profile. I typed: alias ...
1
vote
1answer
78 views

unexpected EOF on the last and next to last line while creating alias

I am creating alias in .bash_aliases file in Ubuntu 14.04 with reference of this article I write these alias agi='sudo apt-get install' alias upd8='sudo apt-get update' alias perms='stat -c '%a - ...
7
votes
5answers
916 views

Run program from anywhere without changing directory

I wish to create an alias, which runs program x, without changing the current directory I am in. What I have now is: alias x = "cd /home/path_to_x && ./x" This works, but changes my ...
0
votes
0answers
15 views

How can I hide files/foldes by alias hide? [duplicate]

I want to hide my files not to add "DOT" before name! I want to hide a file by its name not rename it by put "DOT" ex: my folder in Home called ahmed I want hide it as the same name not rename to ...
2
votes
2answers
163 views

Problem in creating alias, get strange messages

[Reviewers: note that the question was completely rewritten after the close votes.] I recently found how I can define aliases for bash in the ~/.bashrc. But since I tried that, I see the followig ...
8
votes
4answers
1k views

Can I use cd../.. as an alias name?

I am using Windows and Ubuntu in parallel and do console stuff on both of them. On Windows I can do a C:\Users\Thomas>cd..\.. C:\> However, on Linux this does not work, neither with ...
0
votes
0answers
60 views

Creating an alias with tab completion

I know how to create a permanent alias, just edit .bashrc . I created alias forsudo apt-get install <appname> . As you may not know the exact name of app or want to check the dependency u can ...
15
votes
5answers
1k views

How can I run original command that aliased with same name?

An alias for ls command in ~/.bashrc file aliased with this one: alias ls='ls --color=auto' then, when I run ls command in terminal aliased ls(ls --color=auto) runs. but my question is how can I ...
0
votes
0answers
34 views

how can I make an alias that does not fully remove the file like rm [duplicate]

how can I move a file to trash using an alias?
1
vote
3answers
64 views

I can't alias def $?=“type $? || echo 'varible not defined' ”

I want to create an alias called def that takes a varible and checks if it's defined. If it isn't def prints 'the varible is not defined.
1
vote
3answers
148 views

Cannot find location of permanent aliases.

A couple of months ago, I made a few permanent aliases for my bash shell on Ubuntu 14.04. They are actively making my life easier, and I would like to add a couple more to the list, but I cannot find ...
0
votes
1answer
295 views

Alias to open multiple text files in different directories from terminal

After hours of searching and trying different gedit plugins I did not manage to add a session saver to gedit to open some files in Ubuntu 14.04 (see here). So, I am trying to create a permanent ...
0
votes
1answer
108 views

Use alias inside a script

One of the software tools I'm using requires "sh" to be a symlink to "bash" instead of "dash". Since I don't want to change the default shell to bash for the whole system and I can't change the tool ...
0
votes
1answer
52 views

Accidentaly deleted all aliases. How can I restore them?

I accidentally deleted all aliases with unalias utility. There were some useful aliases that I want back (with --color option etc), but I don't want to type them again. Is there a simple way to ...