86
votes
6answers
108k views

How to create a permanent “alias”? [duplicate]

If you create an alias for example: alias cls="clear" It exists untill you kill terminall session. When you start a new terminal window the alias doesn't exist any more. How to create "permanent" ...
2
votes
2answers
500 views

Run program through terminal with custom name [duplicate]

I want to run a program, for example gedit from terminal. How can I run gedit through terminal by just typing ge on terminal?
5
votes
2answers
411 views

How to easily make an alias command permanent? [duplicate]

I search everywhere and almost everyone was suggesting to open the ~/.bashrc or ~/.bash_aliases, then put the alias command there, I created a function name palias as permanent alias function and put ...
2
votes
2answers
87 views

Bash Function Oblivion [duplicate]

I'm fairly new to Linux, as many of you may have noticed. What I speak particularly is adding personal, user-generated functions and alias in my .bashrc file. I'm not exactly sure how bash works but ...
2
votes
1answer
61 views

Is it possible to diy a command under Ubuntu? [duplicate]

For example, can I set? gb = cd /media/Dan/evolution so that everytime I execute gb in bash , I can cd to that particular directory? I find something online, 'alias' command. But It seems can't do ...
-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
48 views

How to create shortcuts in terminal? [duplicate]

I'm using Ubuntu 14.04. I often use cd .. command in terminal. I want to replace the command with .. or some other shortcut. Can I do that? If yes, how to do it?
0
votes
1answer
45 views

Is it possible to shorten a unix terminal command to a shorter one? [duplicate]

Let's say I have this command: /sbin/ifconfig|grep inet|head -1|sed 's/\:/ /'|awk '{print $3}' Is it possible to shorten this to let's say writing host in the command line?
0
votes
1answer
40 views

How to compile quickly without continously having to type [duplicate]

How to compile quickly without continously having to type the whole story of -wall -werror and all those other flags. I know how to use them, but it is a little bit of annoying if I have to type it ...
0
votes
0answers
20 views

How can I link a command with a word for the commandline? [duplicate]

how can I start an exe program (wine /path/to/file.exe) with bash with only a single command, e.g. statistic? For example, I can start Firefox with firefox in the commandline. How can I achieve this ...
41
votes
8answers
293k views

Where is .bashrc?

I feel stupid asking, but I can't seem to find the answer to this anywhere. I'm trying to follow these instructions to edit my bash prompt, but there is no .bashrc in either my user directory ...
22
votes
4answers
22k views

How save my “alias” entries forever [duplicate]

I want to save my alias commands forever like the default ones when I type "alias" so I don't retype them every time I leave my bash
14
votes
2answers
6k views

How do I make bash warn me when overwriting an existing file?

I think the title is pretty self-explanatory. All i want is bash to warn me whenever I attempt to overwrite an existing while using cp or mv. I'd really appreciate some help. :)
7
votes
7answers
1k views

Short-cut for switching to a given directory

In the Ubuntu terminal I find myself spending considerable time to switch to a particular directory every time the computer starts up. Is there some way I can make this process easier? Is there some ...
11
votes
2answers
5k views

How can I get the percentage of my battery life from the command line?

This question tells me how I can find the state of my battery from the command line. While this is useful information sometimes I need something quicker, basically like the percentage or enough for ...

15 30 50 per page