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

0
votes
1answer
28 views

Possibly something wrong with my terminal

Whenever I open my terminal I get something like this: alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e ...
3
votes
0answers
43 views

Redirect 'complete' in bash functions and alias

tl;dr: Is there a way to use an existing auto completion function to also auto complete arguments to an alias or short function. Auto completion in bash is great but does not mix well with aliases ...
0
votes
0answers
17 views

Profile.d and aliases. Why do the aliases not work? [duplicate]

I need to define some global aliases for my PC. I defined them in a file zzz.sh in the /etc/profile.d directory. It didn't work. Then I defined those aliases in /etc/bash.bashrc file. It did work as ...
8
votes
4answers
432 views

Prevent all commands from being defined as an alias

Is there a way to prevent all commands from being defined as an alias? For example a user shouldn't be able to define rm or any other command (Ubuntu default commands) as an alias name.
4
votes
1answer
39 views

Why does alias in /etc/bash.bashrc not apply to sudo?

I've added the line alias ll='ls -l' to the /etc/bash.bashrc. After a restart, the alias ll from that file affects me, which I checked by commenting out the corresponding alias in my ~/.bashrc ...
1
vote
1answer
27 views

How to append another directory to an aliased `cd` command?

I have aliased a long path in .bashrc file as alias py="cd ~/Myprograms/Langs/workout/PythonScripts" Now assume there is an another directory in PythonScripts say "basics" How do I use the above ...
3
votes
3answers
379 views

Create a clickable desktop shortcut for an alias

For example, let's say I have defined an alias under my .bash_aliases, alias gotoheaven="xdg-open /path/to/heaven" now I wish to create a clickable icon for it on the desktop. [I know make link to ...
5
votes
1answer
218 views

Lazy Calculation result of bash functions in alias

I want to open new terminal window in current location by simple command in Ubuntu gnome-terminal --working-directory=`pwd` & disown Work's nice for me. But when I put alias to bashrc alias ...
1
vote
2answers
135 views

Alias to change directory is not working on Ubuntu 15.04?

I wanted to create an alias to quickly go to a particular directory. I added the alias in .bashrc (I tried on .bash_aliases too, the same problem). My alias is named now: alias now='cd ...
0
votes
1answer
42 views

Alias in .bash_aliases executes incorrectly

I have an alias in .bash_aliases and it gives me incorrect output when I trigger it. alias print="echo a b | awk '{print $2}'" incorrect output: ...
6
votes
3answers
305 views

how to 'not' execute alias [duplicate]

I have set few aliases in .bashrc file. I need those aliases most of the time, but sometimes I need to run those command without options set in that particular alias. How to not execute alias ...
0
votes
0answers
10 views

Create and run alias file for command line [duplicate]

I have created a file "~/.aliases" file with the content: # git stuff alias ga="git add" alias gaa="git add ." in "~/.bashrc" at the top I have this code. # ~/.bashrc: executed by bash(1) for ...
1
vote
1answer
39 views

Bash al (alias local) function not found [closed]

Can I have bash aliases local to directory? Given such directory structure: dir1/ - . - .. - dir2/ - file When I cd dir1 alias eg do not work, but when I cd dir1/dir2/ such alias works. ...
4
votes
1answer
108 views

Alias with gnome-terminal acting very odd

Here is a line from my aliases file that makes it so whenever I open my terminal it opens jasonaccomp in the vim editor. alias acc='gnome-terminal -e "bash -c 'cd ~/Downloads; vim jasonaccomp'"' ...
2
votes
0answers
12 views

Link created to `nodejs` with `node` not working [duplicate]

I'm creating 3 VM's. I set up the first two with nodejs/npm but am having problems with the third. (Note: I realize cloning would have been far more expedient, but that's outside of scope of ...
2
votes
3answers
44 views

Remove last space from alias

I want to create an alias for xfreerdp, and I need to concatenate the /v: parameter in my alias with the server name, that I'm obviously providing when invoking this alias. Alias: alias r='xfreerdp ...
2
votes
2answers
399 views

Why is my alias now not working?

So before I reformatted (to get rid of Windows), I simply used this command to open documents by putting it at the end of the ~/.bashrc file: alias commandless= 'gnome-open ...
1
vote
1answer
31 views

help needed understaning ls format meaning

I hit l this evening while compiling some things, and got some unexpected output. $ l l3* lesson03.cpp lesson03.o look.png readme.txt so then I looked at alias: which lists l as: alias l='ls ...
0
votes
1answer
76 views

How to create an alias that will open file in Brackets?

New to this whole Linux thing, and creating alias' in Mac seemed a little easier! Anyway, I'm trying to create an alias that will open the desired file within Brackets, or Sublime... etc. I don't ...
1
vote
3answers
127 views

Cannot get “alias” command to work at al

Running Ubuntu 14.04 LTS I open a terminal, and type a simple alias command, but then it doesn't work: ~> alias ge='gedit &' ~> ge ge: command not found I've also tried adding aliases to ...
0
votes
0answers
16 views

Using aliases with command line arguments [duplicate]

I'm using the g++ compiler to compile my c++ code. I've already created an alias g++='g++ -std=c++11 -o' and it works fine. However I want to be able to create an alias such as grun or gr++ that ...
0
votes
1answer
49 views

Linux Alias with multiple and depending commands possible?

I've created some aliases that I use one after another. It's always depending whether the previous command succeeded. Is it possible to use one alias for multiple commands, depending on the screen ...
0
votes
3answers
33 views

Create flexible alias for an application

I used to use Sublime Text editor, now I plan to use Atom. It would be really nice to have some alias or variable called "editor" I might use in all scripts / commands / launchers and link this alias ...
1
vote
3answers
203 views

Alias to search files by name and open them in vim

I already have an alias to (more) quickly search files : alias f='find . -iname' I use it as such: $ f *statis* ./main/statistics.py ./test/test_statistics.py Now, I would like to have another ...
0
votes
1answer
44 views

Permanent aliases priority

So I've opened a wonderful world of aliases and immediately created a pack of aliases for using with Git and other tools. However it appears that some of the aliases I've declared were already ...
-1
votes
1answer
60 views

How to create a permanent alias in ubuntu [duplicate]

Can anybody please help me as to how to create a permaneent alias in the terminal. When i create an alias in the terminal using the alias name='function' it stays till i close the terminal. ...
1
vote
1answer
323 views

bash alias with parameters [duplicate]

I would like to swap from csh to bash, then I have to set the .bashrc with the commands I use. Translating alias with parameters seems to be not easier as I believed. csh: alias gr 'xmgrace -legend ...
2
votes
1answer
43 views

Create an alias to print a command instead of executing it

I'm just getting into customising my bash profile and I'm wondering how I can type an alias and bring it up on the cli without actually executing it. Using Curl as an example I'd like to type an alias ...
0
votes
1answer
83 views

How to get a command to output the contents into Terminal, and my system clipboard [duplicate]

Let's say I have an alias on my system which I often use to tell me my system information, the alias is systeminfo, and it executes lsb_release -a which outputs: No LSB modules are available. ...
6
votes
2answers
126 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
329 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
52 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
44 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 ...
1
vote
1answer
105 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 ...
8
votes
2answers
100 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
112 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
38 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
976 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
86 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
59 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
40 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
104 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
138 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
21 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
69 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? ...
8
votes
1answer
2k 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
202 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
151 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
580 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
45 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. ...