Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [alias]

In shells, an alias is an alternate name for a command. For instance, "ll" is an alias for "ls -l" on many systems.

0
votes
0answers
10 views

Use shell command execution inside common alias? [duplicate]

I've got an idea that will help me use less more often, tho my alias isn't working right. Can something like the following work for the given input? input: $ cles somefile with: alias cles="sh -c '...
-1
votes
0answers
52 views

How can i fix command alias and export not found? [on hold]

Command '’export' not found, did you mean: command 'mexport' from deb mblaze Try: sudo apt install <deb name> Command '’alias' not found, did you mean: command '0alias' from deb 0install-...
-1
votes
0answers
35 views

Creating a hotkey for an alias

I want to bind a specific cksfv command to a key so that this command is applied for the current folder. So I've created an alias for the cksfv command in the ~/.bashrc: alias cksfv='cksfv -f *.sfv' ...
1
vote
1answer
42 views

Open Firefox developer edition with ALT+F2

I recently installed Firefox developer edition following this tutorial and I want to start Firefox by pressing Alt+F2 and writing firefox in there. In terminal I added an alias, firefox=/opt/firefox/...
0
votes
1answer
42 views

How to configure auto completion on docker-compose alias

I installed docker-compose, set up auto completion which works as its supposed to. However it does not work on aliases. Any ideas how to solve this?
0
votes
2answers
81 views

alias not working inside bash shell script

When I search for .bashrc files in my system I get: /etc/bash.bashrc /etc/skel/.bashrc /root/.bashrc /usr/share/base-files/dot.bashrc I changed: /etc/bash.bashrc /root/.bashrc I added the alias....
1
vote
1answer
64 views

Converting a linux alias to a desktop launcher [duplicate]

I would like to know how to convert the following simple alias to a desktop launcher: cat ~/info1.txt
0
votes
1answer
99 views

calling ssh alias with sshc strange character appear on remote host

when calling via ssh alias a remote host, strange characters appear ^[[6;3~fhem@UB9:~$ ;3~ -bash: syntax error near unexpected token `;' in .bashrc ### add to .bash_aliases, for differentiating ...
0
votes
1answer
620 views

Which command and alias for pip3.7

I created the following alias to run pip3.7 everytime I use pip command: pip='pip3.7' Now, bash says: pip -V pip 18.1 from /home/uname/.local/lib/python3.7/site-packages/pip (python 3.7) but, the ...
0
votes
2answers
21 views

Creating alias- proper syntax

Can anyone tell me if the following syntax is correct? I'm prepending my PATH variable then launching houdini alias houdini_run='pathold=$PATH; PATH=/home/jim/yt-conda/bin:/home/jim/yt-conda/sbin; /...
1
vote
0answers
22 views

Prevent alias with `find` from running at login

How do I make an alias in .bashrc with sub-commands? Right now I have: alias pngc="for file in \`find \$1 -name \"*.png\"\`; do pngcrush -brute \"\$file\" temp.png; mv -f temp.png \$file; done" If ...
0
votes
0answers
33 views

Use of network alias (in /etc/network/interfaces) causes problems when moving to another network

I use dhcp for my network connection but I need a static ip that is in the same address pool than the ip of a device I need to connect in the LAN. For this I have set up a network alias in /etc/...
7
votes
2answers
2k views

Multi line alias in bash

I have the following script. It's a simple test case where a is any string value and b is supposed to be a path. #!/bin/bash alias jo "\ echo "please enter values "\ read a \ read -e b \ echo "My ...
0
votes
1answer
66 views

Error while executing read prompt in csh and converting to multiline alias

Hey everyone i have this issue where i have a sample program in csh (i know its not the best language to use for scripting but i dont have an option here) its as foll: #!/bin/csh echo 'please ...
2
votes
1answer
128 views

Unable to use variables in alias in cshell

This is a sample straight forward program. I am using C-shell and want a solution for this environment itself. Following this code sample: set FILENAME = "\!:2" alias jo 'echo this is my \!:1 file ...
0
votes
2answers
5k views

how to change alias anydesk

I downloaded and installed anydesk (free licence) in Ubuntu 18.04: sudo dpkg -i anydesk_2.9.6-1_amd64.deb But it does not allow me to change the "alias" (change the number to a custom alias, like e....
1
vote
1answer
60 views

How to alias the right way a dpkg-query command (with pipe)?

I'm adding this alias to .bashrc (in one line of course), but unfortunately, this doesn't work: alias lspkg="dpkg-query -W -f='${db:Status-Abbrev}\t${binary:Package} - ${binary:Summary}\n' | awk -F'\...
8
votes
2answers
585 views

Create multiple shell aliases at once

I want to insert into alias different possible variants of spelling, for example, cat command. Can I do it using some symbol for 'or' or should it be on a new line? alias at|cart|cst '/bin/cat'
24
votes
4answers
6k views

What command is the alias ll for?

Can someone tell me what terminal command the alias ll is for? All I can find online is many people saying that it is an alias for ls -l or ls -la or ls -ltr. But that's simply wrong. The result looks ...
0
votes
0answers
34 views

use awk inside an alias [duplicate]

I have this awk command to increment a number inside a file: awk -F"." '{$4=$4<=99?$4+1:0;print}' OFS="." post_all/version.ini > tmp && mv tmp post_all/version.ini This works fine from ...
1
vote
1answer
37 views

alias to take a parameter and exit after execution

In my ~/.bashrc, I have an alias called yy as follows alias yy="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]'" But I often run it this way yy <url list> && exit I would like ...
5
votes
2answers
267 views

Set permanent command shortcut in terminal to cd to Downloads [duplicate]

I wrote a new text file in /bin named ram which contains: watch -n 1 free -h and a file sen: watch -n 1 sensors in the same folder, in order to avoid typing watch blahblahblah... every time. ...
0
votes
1answer
2k views

Why is my alias not working in Zsh?

I have added my alias to ~/.aliases file and the file right now is like this: alias gss="git status" alias gl="git log" alias pa="php artisan" alias reload=". ~/.zshrc && echo 'ZSH config ...
4
votes
2answers
488 views

How do I disable the 'open' command, knowing that it is just a link to the 'openvt' binary?

I'd like users to be able to install my command line tool... https://github.com/occam-proof-assistant/Open-CLI ...globally and run it from the terminal by typing open. The NodeJS package manager, ...
2
votes
1answer
523 views

bash_aliases doesn't work [duplicate]

I created the file ~/.bash_aliases within these lines: # my alias here eclipse="eclipse</dev/null &>/dev/null &" okular="okular</dev/null &>/dev/null &" libre="...
0
votes
1answer
42 views

setting a generic alias results in doing nothing at all

I want to create an alias, that can be defined on any command and concats | lolcat to it. So far I googled myself to alias MyCommandName='f(){"$@" | lolcat; unset -f f};f' but when I test it with ...
-2
votes
1answer
61 views

Terminal profile registering aliases [duplicate]

I'm trying to use the gnome-terminal profiles to cd to a given directory and register some aliases just after the terminal opens. I have created a script: ~/Document/project1/ops-setup.sh #!/bin/...
1
vote
1answer
160 views

alias for command-line options not recognized

I have few flags I want to add to my gcc compilation, so I aliased them as alias gcc_flags='-std=c99 -Wall -pedantic -Wextra -Wconversion' and tried to compile like this: $ gcc gcc_flags file_name....
3
votes
2answers
252 views

Output unix time in alias

I'm running an online store where I can put a variable versiontag to includes JS and CSS as a cachebuster. I. e. styles.css?v2018_01 Wherein the 2018_01 is the version tag. Now I also have a CLI ...
3
votes
1answer
1k views

Where is the alias for ll defined

I often find myself using ll which is an alias. $ type ll ll is an alias for ls -lh I always wondered where this was defined as it works both on bash, zsh but not on sh: # THIS IS SH $ ll sh: 1: ll:...
1
vote
0answers
128 views

Alias in terminal no longer works in 17.10 [duplicate]

I must have done something to my environment in Ubuntu 17.10 as alias in the terminal no longer works. Probably/Maybe after a apt-get autoremove (I guess). Open a terminal and running echo $shell ...
0
votes
1answer
314 views

Alias not working as intended in .bashrc, while command does

If I execute the following through the shell, it works as intended, i.e. it finds the last modified file and outputs it using cat: aux="$(find /home/w/Dropbox/notes/ -type f -printf '%T@ %p\n' | ...
0
votes
2answers
482 views

Aliases execution by script fails while manual alias execution succeeds without problem [duplicate]

I have executed a remote Bash script bash <(curl -s URL/script.sh | tr -d '\r') that does the following 3 actions: Downloads another script with a list of aliases (aliases.sh) to current dir. ...
-1
votes
1answer
753 views

Add multiple aliases to /etc/bash.bashrc aliases if they aren't already there

This is how I add multiple aliases to /etc/bash.bashrc: cat <<-"BASHRC" >> /etc/bash.bashrc alias rss="/etc/init.d/php*-fpm restart && systemctl restart nginx.service" ...
1
vote
1answer
1k views

How can I make a Bash alias that takes user input?

I have a Bash alias for sending a command to my server like: alias ssh=sshpass -p "Passw0rd!" ssh -p 9999 -q -oStrictHostKeyChecking=no user@192.168.1.15 "some_command" but I want to be able to ...
1
vote
1answer
379 views

Alias experiment (re-adding ll to Ubuntu)

I also use Debian 9.3 and there you don't have ll (lowercase LL) Out Of Box (OOB). You have to create it yourself by adding it to one of the .rc files ( alias ll="ls -la"). In Ubuntu of course, you ...
0
votes
2answers
2k views

Refresh aliases without reboot?

After adding a new alias to /etc/bash.bashrc I couldn't use the alias unless I've rebooted via executing reboot. I would prefer not to use reboot is because it's annoying to logout, wait 2-4 seconds, ...
0
votes
0answers
124 views

Bash alias doesn't work, identical command does

I have created a bash command to pass each .mp3 file in a folder to a commandline media player, omxplayer. It also sets the player's volume and throws away the feedback from the player: for i in *....
2
votes
2answers
140 views

Suggestions on how this .bashrc backup script can be improved?

alias isbashrcmodf='cmp -s "/home/user/.experimental/bc/$(ls /home/user/.experimental/bc -Art | tail -n 1)" "/home/user/.bashrc"' alias bashrcbak='cp ~/.bashrc ~/.experimental/bc/.bashrc$(date +-%y-%m-...
0
votes
1answer
788 views

How to alias pip to pip3 while using sudo for a specific user?

I have python2 and python3 both installed on Ubuntu 16.04, and use python3 primarily. I have both pip and python aliased to pip3 and python3, respectively, in my user's .bashrc. However, I had always ...
1
vote
1answer
187 views

alias or nano -B not working using sudo

I have an alias set up alias nano='nano -B' in order to always make backups on change of files. I did this in both /home/<USER>/.bashrc and in /root/.bashrc. It works if I use nano ...
0
votes
1answer
328 views

How to make URL alias

I am using subversuin to manage my project files. One thing is annoying for me. Every time I want to check out my repo I need to use "svn co "URL_TO_MY_REPOSITORY" command. The ULR is very long. I ...
1
vote
1answer
55 views

Alias config is not loaded correctly

This is my alias configuration in Ubuntu 16.04.2 LTS root@Ubuntu:/# cat /etc/.bash_aliases alias i='ifconfig | grep eth -A 1' alias l='ls -lh' root@Ubuntu:/# root@Ubuntu:/# cat /etc/bash.bashrc ###...
2
votes
1answer
309 views

date command not resolving properly in bash alias

I'm trying to set up a way for me to just type newjournal, and a new journal entry named year-month-date-time.txt is created in a year subdirectory in ~/documents/journals. I've got it set up as an ...
0
votes
1answer
47 views

Setting up alias for specific folder for specific command [duplicate]

I have an CLI app which works by navigating to the dir using cd and then executing program 2fa, code The problem is that those commands works only if Im on that specific folder. How I can make a ...
0
votes
3answers
7k views

how to make the changes to source .profile permanent [duplicate]

I am following the following details from another question on this site You can add an alias to the command by editing the file .profile in your home directory: gedit $HOME/.profile and ...
2
votes
0answers
22 views

Why does this bash script for apt upgrade not actually run in the background? [duplicate]

I am trying to create an alias/bash script that will use apt to fully upgrade all applications on my computer as a background process. But for some reason, later parts of the standard out appear to ...
1
vote
0answers
32 views

How can I use `&` in an alias [duplicate]

I want to add an alias for nedit editor alias ne='nedit' or alias ne='nedit $1' works fine but i want to add & at its end: alias ne='nedit $1 &' so that if i do ne filename It ...
7
votes
3answers
11k views

How to find aliases?

Where can I find a list/file of all aliases created in Ubuntu 17.04? I mean shortcuts for commands most frequently used and more.
1
vote
1answer
1k views

Postfix alias not working

I have postfix to send mail using gmail. I have aliases set but things aren't working right if I send mail to someone at gmail.com it works crontab with MAILTO=root sends mail via gmail relay to ...