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
votes
0answers
19 views

Nautilus and htdocs connectivity problem

When i type in my terminal htdocs (alias htdocs="sudo gnome-open /opt/lampp/htdocs") it opens the folder but also i've got this warning: ** (nautilus:10614): WARNING **: Couldn't connect to ...
1
vote
1answer
12 views

Add sugsetions to an alias

When you press tab 2 times you get suggestions for possible commands. For example lsTabTab will print all available commands. Is it possible to add such suggestions to an alias that is user created? ...
12
votes
3answers
226 views

My .bashrc alias not run in .desktop file

I've added the following line to the .bashrc file: alias midos="sh /home/erkanmdr/Belgeler/midos/midos.sh" This command works fine in the terminal and tty. But not working in my .desktop shortcut ...
3
votes
2answers
53 views

add alias to root

I need to execute a command for my system to search for new sd cards and to be able to execute it I need to me logged on as root. Simply using sudo with the command does not work. This is not a ...
5
votes
3answers
162 views

How do I make a custom path identifier?

To define what I mean by "custom path identifier", I mean a short set of character(s) that represent a whole path, and example of this would be the ~, if you type cd ~ in your Terminal Emulator it ...
1
vote
1answer
21 views

How do I make an alias that shows only the date?

Exactly as it says. What code should I use to make an alias to show me only the date, and not the time also?
3
votes
2answers
40 views

Create an alias to a desidred directory to use within terminal [duplicate]

I constantly need to type cd /home/geo/Geant4/geant4.10.00.p02-install/lib/Geant4-10.0.2 How do i create an alias to that directory so I could just type cd $geant (or any other word i decide to ...
0
votes
1answer
27 views

Command not found for alias

I recently installed the apache2 package using the Software Centre, I want to create an alias apacheres which will replace the more cumbersome command /etc/init.d/apache2 restart. I opened the ...
-1
votes
2answers
62 views

Why doesn't the command finish

I have added this to .bashrc alias a='ap update && ap dist-upgrade -y && do-release-upgrade -d && ap check && ap autoremove -y && ap autoclean' So i can run ...
0
votes
2answers
42 views

Is it safe to alias rm to safe-rm?

We are happy to use safe-rm as a replacement to rm, but is it considered safe to alias it? e.g. alias rm='safe-rm'
-1
votes
1answer
144 views

alias of nodejs as node on 14.04

i installed nodejs with apt-get on 14.04 When i do nodejs -v v0.10.25 and when i do node -v node : command not found. So i want to make alias of nodejs as node So i inserted a line in ...
2
votes
1answer
27 views

alias multi commands as one alias

I made an alias for youtube-dl with some options like that yd="youtube-dl -cit -f 18" so I can download it like yd URL I want to modify it to show only the two lines from the output using ...
0
votes
2answers
33 views

argument-aware alias command?

I want to create an alias for curl which automatically writes the file it curls into a file with the same name in the current directory. For example: % curl https://bootstrap.pypa.io/get-pip.py ...
4
votes
1answer
104 views

How can you mirror an autocomplete function in your own aliases (in 14.04)

I have a bunch of aliases that I've used on my 12.04 machine. example: alias pssh="tsocks ssh" alias pscp="tsocks scp" alias prdp="tsocks xfreerdp ..........SOMETHING ...." These aliases are ...
2
votes
2answers
118 views

How do I create an alias that displays the contents of a `history list`?

How do I create a new alias command called cet103demo which displays the contents of the bash history list one page at a time, and also making sure the new alias is automatically loaded when the ...
6
votes
2answers
147 views

Is there a way to shorten(not remove) the path displayed in the terminal by an alias

I want something like this: "vivek@grishma:~/xxx/yyy/zzz/src$" to be shown as "vivek@grishma:datasource$" where I would somehow have predefined "datasource" to be an alias for the long path above. ...
0
votes
1answer
90 views

How to create alias with g++?

I'm trying to create an alias on ubuntu for the bellow commands: g++ -lSDL -lSDLmain -lSDL_image -lGL -lGLU src.cpp -o a.out g++ -lGL -lglut `sdl-config --cflags --libs` src.cpp -o a.out When I ...
0
votes
0answers
20 views

Duplicate Alias addresses in the network?

Currently I use alias ip address to make sure the client talks to the active database. Basically the alias ip always is on always on the active database, during the failover, the script will reassign ...
2
votes
3answers
124 views

How to check if alias is not replacing an actual command?

How can I know if an alias I make (in .bash_aliases) is not replacing an actual command by same name? I don't want to do such things by accident. (I looked in "Questions that may already have your ...
1
vote
1answer
309 views

Running a command in a new terminal instance in a bash script

I have a bash script where I configure my proxy settings automatically. I have created some aliases in the .bash_aliases file. Now there is one command where I ssh into my remote server and do some ...
1
vote
1answer
69 views

`/etc/profile.d` really does not want to work for me

Does /etc/profile.d work or not? I create a file rexster-console.sh in /etc/profile.d: alias rexster="/var/rexster-console-2.4.0/bin/rexster-console.sh" -rwxr-xr-x 1 root root 66 Feb 15 13:05 ...
0
votes
0answers
26 views

Defining aliases with byobu

I want to have a few aliases for my byobu sessions, but I'm not sure where in the byobu files I'm supposed to put the commands (alias <name> <command>).
0
votes
0answers
31 views

Dealing with alias hostname Ubuntu and Apache server

I have installed and have up and running Apache server on ubuntu 12.04 server. I also changed my /etc/hosts file and added an alias for my server. I'm hosting a site locally, I want to be able to use ...
0
votes
1answer
103 views

Providing alias for eclipse does not work

I tried to open my bashrc and tried to provide an alias for eclipse like alias eclipse='bash /usr/local/softy/eclipse/eclipse' But I get the following error when I try to invoke eclipse. ...
0
votes
2answers
47 views

how to setup an alias apache2

I am new to UBUNTU and try to use apache to check a website that I am currently developing using Joomla (novice to that too). I am trying to setup an alias in httpd.conf, but have not been ...
1
vote
1answer
301 views

bash: alias: alias: not found

When I log in, I see the error: bash: alias: alias: not found If I source my .bashrc file, the message appears again. What is causing this?
0
votes
2answers
160 views

How can I install the alias command?

My Ubuntu installation does not have the alias command. Usually it would be in /usr/bin along with other basic commands like which. I can type: which which /usr/bin/which but which alias ...
-3
votes
2answers
37 views

Alias command defining problem [closed]

Define the noAgtw alias for a group of commands counting and displaying the number of all files in your account’s space with the names starting with g, t, and w and put the alias in your environmental ...
0
votes
2answers
41 views

Resetting an alias

In my .bashrc file I created a new alias: alias source=mvn eclipse:eclipse -DdownloadSource=true -DdownloadJavadoc=true I executed source .bashrc, however I realized the horrible mistake I made and ...
1
vote
3answers
39 views

Confused with the alias solution?

I am trying to define alias for a group of commands counting recursively and displaying the number of all sub-directories encountered for any working directory (including ones with invisible file ...
1
vote
1answer
32 views

Having problem with alias?

I am trying to define alias for a group of commands counting and displaying the number of all files in account’s space with the names starting with g, t, and w. I got the result with the following ...
0
votes
1answer
170 views

How to count and display number of all files in any working directory?

I am looking for a command to count and display the number of files in any working directory. Further I want to set alias noAf for the command. I have searched for it a lot. I found the following: ...
0
votes
1answer
158 views

zsh aliases doesn't work from .zshrc file

I want to create an alias to mount some remote file systems locally. I placed lines like this in my .zshrc file: alias remfs='sshfs rem: ~/mnt/sshfs/rem' But when I run remfs, I get an error ...
1
vote
3answers
148 views

Alias substitution for a string to use it in a terminal command

Is there a way to substitute aliases such that it is appended or prepended to an existing command in the shell? For example, defining the alias: alias execloc='/home/user/' Prepending this to a ...
1
vote
2answers
100 views

How do I execute a program with default variables?

How can I execute a program (specifically a bash alias) with the default environment variables? Consider this example: export test="something I dont want to exist" alias _xterm='xterm -fn 7x13 -fa ...
2
votes
1answer
161 views

Nonblocking bash commands?

So I just created the .bash_aliases and wrote the following: callNotepad(){ wine C:\\Program\ Files\\Notepad++\\notepad++.exe $1 } alias notepad++=callNotepad Now whether notepad++ is already ...
1
vote
1answer
151 views

Synclient alias in .bashrc not responding

I created an alias to turn the mousepad off with synclient, but it does not respond as expected. After running the synclient touchpadoff=1 in the terminal however, the alias starts to work properly. ...
0
votes
1answer
96 views

Why can't I set up alias for shutdown?

I have edited my .bash_aliases to contain the following line alias shutdown='sudo shutdown -h now' but when I try to run the alias it gives this error message shutdown: illegal time value Try ...
3
votes
1answer
519 views

Bash aliases - how do I run a file in a different folder without losing my current location?

I have a nice little bash alias in my .bashrc folder that allows me to start Tomcat running without having to cd into the folder first, e.g. alias startTomcat="cd ~/apache-tomcat-7.0.34/bin/ ...
3
votes
3answers
523 views

How to run source on terminal start up?

I have alias ready on .bash_aliases. Problem I'm having right now is that I need to run source ~/.<filename> first before I can execute the alias command. My question would be how do I run ...
2
votes
2answers
5k views

Apache Alias Folder: 403 Access Forbidden

Ok, I have set up an alias on my apache server to point to a directory on a second HD. The Directory is /media/MediaServer/Videos. The point of all this, is to stream videos from that folder, to my ...
8
votes
1answer
9k views

How to remove an alias?

I want to remove gs alias from my PC. When type gs it will open the Ghost Script. But I checked everywhere in the home directory .alias .bash_aliases .bashrc I also overwrite the gs with my custom ...
1
vote
1answer
91 views

“Trash” equivalent for 12.04

I recently updated my Ubuntu version to 12.04. I have aliased rm to the command trash, and now that I have upgraded, there is no longer a command called trash. Is there an equivalent for 12.04? I ...
-1
votes
2answers
53 views

bash script isnt working

I have written this simple type alias script in my bin dir in home #!/bin/sh alias kp='ls –L' alias ldir='ls –aF' alias copy='cp' and saved it in the name myenv.Then I have changed the mode using ...
0
votes
2answers
253 views

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .bashrc that looks like this: ls() { if(some ...
1
vote
1answer
260 views

Bash alias permanent <without running bash or . ~/.bashrc>

I'm used to putting my alias in .bashrc, but Ubuntu suggests putting them in .bash_aliases. So that's fine, I put my alias there in the .bash_aliases file. However I want to run my aliases once I ...
4
votes
2answers
122 views

Create alias with paramater in the middle

I want to create an alias for grep like this: grep argX ~/myfile where argX is a parameter and myfile is always the same. How can I do this?
3
votes
1answer
228 views

Why doesn't this command work as an alias?

I've been using the following command to list the ten largest files, at any depth, under the current directory: find -type f -size +10M -exec ls -gGsSh1 {} + | awk 'NR<=10 {print $0}' (I use awk ...
2
votes
2answers
128 views

How to add a password option in CLI?

I've googled extensively but haven't found how to add a password option so I don't have to type it in manually. I've created the following alias: alias int='sudo service network-manager restart' ...
5
votes
2answers
3k views

How to protecting cd command to deal with parentheses?

I asked here how to make cd protect spaces. Tab completion is great, but sometimes you paste the path from the clipboard so this is useful. The solution breaks with parentheses however. No matter how ...