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.

Filter by
Sorted by
Tagged with
1
vote
0answers
23 views

bash_aliases are not working in Ubuntu run (Alt+F2) dialog

bash_aliases are not working in Ubuntu run (Alt+F2) dialog. It shows a "Command not found" error. But it works perfectly in Terminal. How can I make it working in run command box?
0
votes
2answers
43 views

“which alias” and “whereis alias” doesn't return anything [duplicate]

I recently installed Ubuntu 20.04. I am unable to find the alias command. When I enter which alias I get nothing back. Same with whereis alias.
0
votes
0answers
18 views

Terminal shortcut to a sequence of keys

I often need to restart programs in several terminals while testing with: ctrl+C + arrow up + enter. How can I make a shortcut for this sequence: ctrl+C + arrow_up + enter? Ubuntu 16.04.6 LTS
0
votes
0answers
23 views

trying to make bash alias on mac

I am trying to follow this explanation of how to make an alias and made the following .bashrc file in my home directory. Here it is: # .bashrc # User specific aliases and functions alias py='python3'...
0
votes
0answers
21 views

How To Alias Conditional-Chained Commands with Env Vars and Directory Stack? [duplicate]

I enjoy using pushd and popd to navigate, but I also want a "swapd" that swaps the current directory and the next directory on top of the directory stack (dirs). With swapd, frequently swapping ...
1
vote
0answers
34 views

sSMTP, mail, aliases

I setup ssmtp to send email messages from my Ubuntu server to an external email address. Using the mail command of the mailutils package, I am able to receive emails from my server sent via : $echo ...
0
votes
0answers
60 views

line 5: alias: python: not found [duplicate]

This is the problem I face when I boot my laptop. Error found when loading /home/pulkit/.profile /home/pulkit/.bashrc: line 5: alias: python: not found /home/pulkit/.bashrc: line 5: alias: =: not ...
0
votes
0answers
23 views

Aliasing with reserved keyword or command alias? (Overwriting)

Is it possible to make an alias with a name that is already reserved as a keyword/command in Linux and Ubuntu? If I alias passwd or chpasswd with the same name but use additional parameters so that ...
0
votes
1answer
55 views

Alias for “echo $?” doesn't work

I am trying to set alias for echo $? which returns exit status of the most recently executed command. I've put alias status="echo $?" in ~/.bashrc. But it's not working, it's always returning 0. user@...
0
votes
1answer
137 views

ZSH Alias with Multiple Commands giving “command not found”

I am using this series of commands to build and run a docker container. The commands work when combined with && and give output like this: > docker stop $(docker ps -a -q --filter ...
0
votes
1answer
45 views

Assign Semi Path to a variable

How can i assign only the first 4 words of a path to a variable for example: my current working directory is /home/Foo/Documents/Programs/ShellScripts/Butler and i want assign a variable with path ...
1
vote
1answer
51 views

Alias for BASH integer calculator

My .bash_aliases file is populated with single-letter aliases (such as o for octave-cli and r for sudo reboot. For a while I've been wanting to implement BASH's built-in calculator to do quick ...
6
votes
4answers
365 views

Alias for all users

I created a this file: /etc/profile.d/pycharm_alias.sh startPyCharm() {... } alias py=startPyCharm I rebooted the PC, but then the alias is not available: ===> alias ...empty If I login to ...
0
votes
1answer
97 views

alias updt='sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y' … What could go wrong?

I currently use this handy alias I call "updt" on a daily basis in the following manner: alias updt='sudo apt update -y && sudo apt upgrade -y' I was wondering if anything could possibly go ...
0
votes
2answers
99 views

When making an alias; quatation marks, apostrophes or semicolons can prevent the command to work properly?

I have a file called .bash_aliases where I keep my first (and only one untill now) alias witch work properly, but when I tried to create a new one the terminal failed to recognize the command line, I ...
3
votes
2answers
104 views

Alias to open last file edited in Vim

I am running Ubuntu 19.10, and I am trying to alias the command "vv" to open the last edited file in Vim. Below is my results from running the command 'alias'. ~/Documents/code$ alias alias alert='...
1
vote
1answer
73 views

Ubuntu VPS 18.04 server Apache2 Domain Alias

I hope someone can help me some. I believe this is an easy problem. I currently have a VPS running ubnuntu 18.04 server and Apache2 . I have prestashop installed and trying to configure the multi ...
-1
votes
1answer
1k views

Command not found error after trying to install mgltools on WSL

I am working on Ubuntu windows application. I want to use a tool and I have downloaded the file and install it is in /usr/local/bin. I want to access the tool from anywhere and for that I have write ...
1
vote
1answer
40 views

How do I use older gcc on Ubuntu for one particular build without affecting the system?

On Ubuntu 19.04, I have to build a project that requires an older gcc version that one installed in my system. For certain reasons, I cannot modify makefiles; during the build, gcc command must invoke ...
2
votes
1answer
49 views

SSH conection problem after write an invalid alias

I've made a new alias in the remote machine /.bashrc, since I did it and I close the session I just can't log in again using the shh protocol. As you can see in the code, when I try to log in, the ...
4
votes
2answers
284 views

Alias to open a graphical Program (nautilus) opens it in Terminal too

When I type nautilus ., it will open the current directory in Nautilus only outside of the terminal, and I can go on with whatever I want to keep doing in the terminal, without having to cancel the ...
1
vote
1answer
137 views

Open new Chrome tab into an existing window from terminal?

i have created the alias: alias chrome="google-chrome &" but even if Chrome is already open it still opens a new window. Is there anyway to just create a new tab in the existing window if it's ...
11
votes
2answers
6k views

“syntax error near unexpected token” after editing .bashrc

I'm trying to access the clipboard but when I input source ~/.bashrc in the terminal I get this error: bash: /home/taran/.bashrc: line 2: syntax error near unexpected token (' bash: /home/taran/....
4
votes
1answer
1k views

Should I put an alias in .bashrc or .profile?

I want the following alias to be available each time I open a shell: export ZONE="us-eastern1-c" export INSTANCE_NAME="myInstance" alias gc='gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME -- -...
2
votes
1answer
79 views

open new terminal results in editing bash_aliases file

I got my git aliases in my .bash_aliases file. Since yesterday, when I want to add alias like alias gpuo='git push --set-upstream origin'. First, he doesn't find it and secondly, he open ups this file ...
6
votes
1answer
107 views

Adding one variable into multiple parts of an alias? alias nd='mkdir $1' works but cannot add anything after, why? [duplicate]

I have the alias alias moveit='mkdir $1 && find -name "*$1*" -type f -exec mv -t ~/$1 {} +' But I'm not quite sure what I'm doing wrong. Any help would be much appreciated. I'm trying to ...
0
votes
1answer
33 views

How to assign an input parameter for a function including awk?

I am making some shortcuts for my account in a computation cluster. When I submit a job, the system assigns a job-ID (JOBID) to my calculation. To list all my calculations, I made an alias alias j="...
0
votes
0answers
30 views

How to set a variable in an alias for a number of directories?

I'm working in a large computing cluster and when I submit a job, the system assign an ID for the job and creates a file with that ID for the calculation. The directory path is too long, so I want to ...
0
votes
0answers
35 views

Alias doesn't work when I expect it to, works when I don't [duplicate]

I have an "installer" script that installs a couple scripts and a directory for them. This works as expected. In the middle of my script I also have an alias I inject into the local .bashrc so that ...
0
votes
2answers
167 views

How do I create alias for AWS or create SSH config file for connecting Amazon using SSH?

I'm trying to create an alias for Amazon AWS. I have tried alias amazon="ssh -o IdentityFile=~/home/user/Desktop/AWS Machines/file.pem dns.compute.amazonaws.com" But getting ssh: Could not resolve ...
0
votes
0answers
43 views

keeping PWD while switching to grids

I am currently using cshell at my workplace. foll. is the alias i had kept as a shortcut to login to my grid alias joreg 'qrsh -P grid1' Now whenever i go from my home to another grid it takes me ...
0
votes
0answers
17 views

Apache alias do not show images with https

I have created an alias to store product images on a different drive as follow: ServerName multiplace.net.br ServerAlias www.multiplace.net.br ServerAdmin contato@multiplace....
0
votes
1answer
61 views

adding a second command to a python script with args

I have an alias for a python script that basically converts some files into another format, I want to be able to remove some intermediate format that this script generates as a post process after ...
9
votes
4answers
863 views

How do I set an alias to a terminal line?

I want to easily set an alias git-go to this terminal line: git commit -m "init "; git push; git status So when I enter git-go this line should enter. How can I do that? The answers I seen only ...
0
votes
0answers
117 views

Multiple alias commands for NordVpn - disconnect from vpn && restart internet

I am using NordVPN and for it a dedicated terminal program. I have made two .desktop alias to connect to vpn and to disconect. Fist one is to connect to US server: [Desktop Entry] Name=NordVPN c us ...
2
votes
1answer
77 views

How to check if an alias ran successfully in shell scripting?

I have a bash script where I'd like to check if an alias to activate conda runs successfully and if not raise an error. Although script runs without raising an error, none of the echo's get printed. ...
1
vote
0answers
44 views

Alias don't function Ubuntu Mate 19.04 [duplicate]

I setup an alias on my Ubuntu Mate 19.04 like this, alias up='apt-get update && apt-get upgrade' I've setup the alias at the end of the file bash.bashrc, using these commands, nano /etc/...
0
votes
1answer
26 views

Command “look” optimisation (virtual linebreaks)

(I am not totally sure if this question ONLY belongs to Ubuntu but rather to all OS supporting a command line or shell) ~/.bashrc | ~/.zshrc alias proxyon='export FTP_PROXY=http://ftp-proxy.intern....
1
vote
1answer
115 views

How can I make an alias for a long ls command?

When I type in xfce4-terminal the command: ls -pltrh --color=always --time-style="+%d-%b-%Y $newline%H:%M" | grep --color=never -v / | cut -d ' ' -f6- echo -e -n '\033[1;5;36m'"Diretório §⮕ " echo -...
0
votes
0answers
924 views

How to open jupyter in WSL via terminal with a specific starting directory?

I unfortunately didn't found a solution to the above described problem. Since there are several python packages only available for linux I want to use python now from WSL. I installed anaconda on ...
0
votes
1answer
114 views

Save function as alias

I am working on function that will resize and optimize all images in the directory with single command. So far I created this function function prepareimages() { # Resize Images for img in ...
0
votes
1answer
597 views

dmenu doesn't recognise aliases [closed]

My dmenu doesn't recognise aliases. I've found a solution but I can't seem to figure out what he is trying to say.
2
votes
1answer
1k views

How to create an folder path alias on ubuntu EC2 instance?

ubuntu 18.04 on AWS I followed an answer on stackoverflow to create a path alias: nano ~/.bashrc alias myfolder='/home/xxx/pms' When I try to cd cd myfolder I get: No such file or Directory ...
3
votes
1answer
402 views

How can I use an alias in a function?

In my dotfiles I have some functions that rely on aliases or functions to exist for them to work. For some reason, I can get them to reference other functions I have created, but not aliases for ...
1
vote
1answer
129 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
515 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
3k 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
216 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
153 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
5k 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 ...

1
2 3 4 5
7