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

1
vote
1answer
22 views

Aliasing gedit to suppress terminal output

I am SSH'd into an embedded board (Jetson TK1 running Ubuntu 14.04). I use the -X option so I can use gedit to edit text files. When executed from a terminal, gedit spews a bunch of garbage on the ...
2
votes
1answer
30 views

How to run a parameter as an alias in a shell script?

I have an alias alias ll='ls -lF'; I created a bash script temp.sh: #!/bin/bash # Allow aliases to work in bash NON-interactive mode! shopt -s expand_aliases # .. and load them source ...
0
votes
1answer
44 views

How to make a permanent alias in oh-my-zsh?

In my .zshrc I tried to make a few aliases .I looked into a lot of places, but I couldn't find out a way that worked. I used this code below: # Set personal aliases, overriding those provided by ...
0
votes
1answer
33 views

Alias not working on Apache2.4

I have upgraded from an earlier Apache2 to the latest Apache 2.4. My previous setup had the following alias in default.conf file in the sites-available directory: Alias /weewx ...
0
votes
0answers
20 views

How to make an alias for delete function?

Today I erased my thesis. Fortunately, I had a backup on Dropbox, so I was able to recover it. I would like to know if there's a way of using an alias to make a delete function that moves a file to ...
1
vote
2answers
46 views

Does the terminal learn common typos? [duplicate]

This may seem like a stupid question. I'm using Ubuntu 15.10 with GNOME Terminal 3.16.2. When I was new to the system, I often typed 'l' or 'la' instead of 'ls' to list files, and would then be told ...
3
votes
1answer
82 views

alias nested string

I have an alias for youtube_dl which adds some arguments in my .bashrc file. I want to run this in a separate terminal similar to how it is done here. The problem is that this takes a string as input. ...
1
vote
0answers
23 views

How to run aliases under tmux without root privilege [migrated]

Under terminal multiplexer tmux I am unable to use alias as a normal user. alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' For alias of alias l I have to type ls ...
0
votes
0answers
35 views

Display managers, aliases and dot-files

I am trying to set my system up to use the notion (ion3 fork) window manager, I logging in through the mdm display manager. Notion provides a a textual launcher that is activated by the F3 key. The ...
0
votes
1answer
34 views

How to create a alias for running a server and its client simultaneously

I'm trying to create an "alias" to run a server in a separate terminal, then after a few seconds open its client, this is the command I'm trying: alias kingp='xterm -e sudo ...
0
votes
1answer
62 views

My permanent alias isn't working [duplicate]

Sorry I am new to ubuntu, just installed it. The version Ubuntu 14.04.4 LTS. I finally learned how to install a program called WebStorm and trying to create an alias for it. I tried creating it ...
1
vote
2answers
38 views

How to make aliases for file paths?

I have many folders on my machine, many of those folders have more folders within them, more folders within those folders, and so on... Now when I am doing certain cd and cp operations that I do every ...
1
vote
1answer
81 views

'source' builtin in bash not recognized in cron environment

A user crontab entry that reads: 0 */4 * * * $HOME/postscript/fprogcache-sync works fine. Wanting to add a few environment variables to the cron-job context, I then tried 0 */4 * * * source ...
3
votes
2answers
28 views

Catch user input with alias

So I recently showed my friend the wall command. Now he keeps using it to talk and I regret showing him. I want to make an alias call wall to keep him from using it and to also prank him. I did ...
0
votes
1answer
36 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
70 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
18 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
468 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
51 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
493 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
234 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
169 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
56 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: ...
7
votes
3answers
316 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
64 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
133 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
48 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
444 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
34 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
144 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
187 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
76 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
37 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
241 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
60 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
74 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
818 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
45 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
115 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. ...
8
votes
2answers
170 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
341 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
67 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
60 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
136 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
104 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
154 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 ...