Linked Questions

339
votes
9answers
700k views

How do I create a permanent Bash alias?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a ...
23
votes
4answers
39k 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
1
vote
1answer
4k views

Problem setting alias, ~/.bash_aliases file not found [duplicate]

I was trying to setup a permanent alias. but ~/.bash_aliases file not found on my system. I have checked the bashrc file and it shows bash_aliases are enabled. I tried creating a new file in the same ...
4
votes
3answers
1k views

Create a bash alias for several commands, some requiring sudo [duplicate]

I know there is lots of information on this around, but I still find it confusing. Please help me with this quick one liner. What do I need to write and where to make this a permanent feature of my ...
0
votes
0answers
551 views

Aliases don't work [duplicate]

I can't get this to work at all. I am running ubuntu 12.04 in virtual box and am trying to follow this tutorial. I have realised that I have .profile not .bash_profile. I typed: alias today='...
0
votes
0answers
22 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 non-...
232
votes
15answers
570k views

How can you log out via the terminal?

Is there a terminal command that will log you out of your current desktop session and take you back to the login screen?
98
votes
9answers
771k 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 (~/....
42
votes
7answers
56k views

I can't use the terminal while gedit command is running

I recently installed 12.04. When I try to edit a file with gedit, I can't use the terminal until I close the editing file or I have to open a new terminal. But I think I didn't have this problem with ...
57
votes
3answers
18k views

Why doesn't the `time` command work with any option?

I tried to use time command with -f option to format the output of time, but I get the following error: -f: command not found Then I tried to use other options -a, -o, etc and I get the same error. ...
29
votes
10answers
5k views

How can I set up a password for the 'rm' command?

My friends keep deleting my files using the terminal. So please help me out by explaining how to make a password for rm command.
31
votes
8answers
37k views

How can I encode and decode percent-encoded strings on the command line?

How can I encode and decode percent-encoded (URL encoded) strings on the command line? I'm looking for a solution that can do this: $ percent-encode "ændrük" %C3%A6ndr%C3%BCk $ percent-decode "%C3%...
31
votes
7answers
69k views

How to add an alias to a command in terminal?

By typing a manually specified command in terminal I want to execute some other command. 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 ...
24
votes
2answers
34k views

Understanding .bashrc and .bash_profile

On a server when I login as root I see .bashrc (Ubuntu 10.10). On my Mac I have a .bash_profile Does Ubuntu always have only a .bashrc file and not .bash_profile? (I'm just confused, so asking, I ...
21
votes
2answers
18k views

How do I get spaces instead of tabs in nano?

I usually edit Python files with nano, so I need four spaces instead of a tab. How can I get nano to automatically insert spaces for tabs, and control how many of them it inserts?

15 30 50 per page