6
votes
2answers
126 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. ...
2
votes
2answers
84 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
132 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
41 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
2answers
32 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 ...
0
votes
1answer
103 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 ...
2
votes
1answer
136 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
134 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. ...
6
votes
1answer
3k 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 ...
0
votes
2answers
207 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 ...
3
votes
1answer
209 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
126 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' ...
0
votes
2answers
1k views

Why is setting alias in .profile not working?

I have this as the last line in my .profile: alias gl="cd /home/jrenner/glances/glances" yet even after reboot I get command not found when typing gl. What is happening? I am logged in as the ...
0
votes
1answer
369 views

access to usr/local/bin

My question is this. I have a jar file that I want to be able to run from command line with a simple command. So in my ~/.bashrc file I created an alias like so: alias selenium='java -jar ...
3
votes
3answers
1k views

Is there a way to echo an alias?

I have set some aliases in my .bashrc file and for some reason one of them does not behave as expected. Since I don't remember the exact command assigned to that alias, I would like to see the ...
3
votes
2answers
151 views

Working directory when running command

I've got an executable, let's call it exec. It lives in a directory, for the sake of argument called dir. Let's say it's at the filesystem root. I can run this executable by doing cd /dir ./exec ...
3
votes
1answer
231 views

When I open Terminal it says command alias not found and closes

I was messing around in Terminal (bad idea, I know, but I'm usually pretty good with it) and now it does what the title says. I know about pressing Control-C to stop it from running, but how do I just ...
4
votes
1answer
252 views

How to run some alias command in bash's non-interactive mode

I want to run some alias command in bash's non-interactive mode. But seems Ubuntu ignore BAHS_ENV. How can I make it work? la is a alias command. And I tested in other linux. it is work fine. Just ...
3
votes
1answer
155 views

Aliases - able to pass arguments?

I want to make an alias in my .bashrc or .bashrc_aliases file (probably the latter). Specifically, I want to call the clang command for my *.c file I'm writing. What I'm looking for is best summed up ...
6
votes
2answers
532 views

What does the l command do?

There is a command l available on my machine which appears to do nothing. which l also produces no output. Is this a real command, and does it actually do anything?
1
vote
1answer
2k views

Ubuntu alias not applied in bashrc

I am under Ubuntu 12.04 LTS. I have added such line to ~/.bashrc alias myconf="sudo nano /opt/nginx/conf/sites-available/efiling" I tried with single quotes too: alias myconf='sudo nano ...
3
votes
1answer
485 views

Autocomplete on .bash_aliases commands?

I have a whole bunch of aliased commands in .bash_aliases The most generic examples are alias apt-update="sudo apt-get update" alias apt-upgrade="sudo apt-get dist-upgrade" but then I also have ...
1
vote
3answers
429 views

Trouble with aliases and opencv

I have an alias defined to compile an opencv program which goes like this alias gcv='g++ -I/usr/local/include/opencv -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_objdetect' Then I go on ...
4
votes
1answer
2k views

Aliases don't work after restart terminal

I have create few new aliases in ~/.bashrc then run source ~/.bashrc and it worked. But after restart terminal it does not work. I looked back and found the advice: create ~/.bash_aliases and in ...
-1
votes
1answer
217 views

Linux Mint 11: How to force 'which' results to be updated? [closed]

With command which we can get the pathname which would be executed in the current environment. But when I redefined a command with alias in .bashrc . The result returned by which is still the old one ...
8
votes
5answers
6k views

How to add an alias to a command in terminal?

By typing a manually specified command in terminal i want to do some. How could add an alias to a command? Can i do that with the help of the terminal or should i edit some kind of file?
4
votes
2answers
6k views

bypass the yes/no prompt in apt-get upgrade

in order avoid typing out all of the apt-get commands when updating my computer i have made a simple alias command to do it. But i really want to be able to just type in my alias and let it do its ...
19
votes
3answers
3k views

How to see the command attached to a bash alias?

Suppose I have an alias in the bash shell. Is there a simple command to print out what command the alias will run?
4
votes
2answers
151 views

How can I create something similar to an alias, that does properly expand to the initial command?

I have set up aliases for apt-get update, apt-get install, and so on. Thats quite convenient. But what I really would like to have is something like this: type agi TAB vi and have it automatically ...
0
votes
2answers
175 views

Start an aliased application from shell passing relative path of a document

I "aliased" a shell command in this way: alias "myapplication"="/home/manuel/myapp/bin/startapp.sh" Now i'd like to pass to it a relative file-path where i am when i execute the aliased command, ...
15
votes
6answers
1k views

Which aliases do you find most useful or helpful to your Ubuntu experience?

Since first becoming an Ubuntu user I have developed a growing list of aliases, and there are some that I cannot imagine being without. This makes me think that there are probably still tons of ...
1
vote
2answers
2k views

Differences between fish and bash to pass commandline arguments to alias functions?

From the answers to my other question here i learned about the possibility to pass commandline arguments to a alias function in Bash. In Fish i can edit an alias by editing the file config.fish in ...
6
votes
2answers
962 views

How can I create an alias so that when I enter “kt” it executes “killall gnome-terminal”?

How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?
18
votes
5answers
4k views

How can I create an alias for cd and ls?

I frequently run the ls command after running the cd command. How can I create an alias (like cs) for this operation?