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 votes
1 answer
57 views

Can alias be part of the string I type on the command line?

Can I make an alias in the way that it is part of the string I type on the command line? In addition to that, I'd like that alias to have more than one value. For example, if I enter any of the ...
user1696453's user avatar
0 votes
1 answer
42 views

What overwrites an alias created by a file in /etc/profile.d? (environment variables)

I executed the following command to create an alias file in CentOS 7.9: echo 'alias ll="ls -alhF --color=auto"' > /etc/profile.d/alias-ll.sh Then once I restarted the shell, "type ...
Tristan's user avatar
  • 103
1 vote
1 answer
57 views

How to list aliases (“alias” command) from within a script

I’d like to execute the “alias” command from within a script. It’s under the “Settings” area for the user. I can execute “env” but would like to follow that with their set aliases that they/I would ...
Matthew Morrow's user avatar
0 votes
2 answers
61 views

Alias path not found on Ubuntu

I installed kind from kubeflow kind and save it under my $HOME/kubeflow/kind To run kind from any path, I create an alias in my ~/.bashrc as following: alias kind="./$HOME/kubeflow/kind" ...
BetterEnglish's user avatar
0 votes
2 answers
87 views

Create alias with variable input?

So I've seen a similar question to this, but using fish. I though am using vanilla ubuntu 20 terminal. What I have is an alias for a directory 1dir='cd such/and/such/and/such', and another for running ...
user20982182's user avatar
4 votes
2 answers
1k views

How to create an alias for a "cat" file usable in a path

I have two huge files (150G each) and I need to use a tool for which I should supply them as a single file (since the tool only accepts one file). However, I do not want to merge these files for ...
ashenflower's user avatar
0 votes
1 answer
231 views

Can't Create a Permanent Alias In Fish Shell

I'm trying to create a permanent alias. I've created one long ago, but I don't remember if I did anything differently than what I'm doing now. Be as it may, it isn't working! I start by opening the ...
Rich Hard Fine Man's user avatar
2 votes
1 answer
335 views

Create an executable that is an alias for another command

I've downloaded Open Video Downloader which is a gui to youtube-dl (which is kinda dead) I've replaced it with yt-dlp (youtube-dl fork which is working) My problem is that yt-dlp needs python 3.7+ to ...
Enrique's user avatar
  • 329
0 votes
1 answer
46 views

sudo -s -H and aliases

I often use sudo -s -H, but want to have aliases after executing it How to? Explanation: I log in server as user1 (which is in sudoers). This user has aliases in .bash_aliases: alias rm='rm -i' now I ...
Tomasz Brzezina's user avatar
-1 votes
1 answer
255 views

Alias to create a Python package

Wondering how to create an alias for creating a Python package. A Python package is nothing more than a folder with an empty __init__.py file inside it. So basically I need something like alias pydir=&...
Gabriel Tkacz's user avatar
1 vote
1 answer
594 views

System doesn't remember alias

Somewhat of a novice here. I recently installed the flatpak Brave browser and since it's tedious to write flatpak run com.brave.Browser every time to run it from the terminal, I tried to create an ...
Uncle Woods's user avatar
0 votes
0 answers
23 views

nohup in alias has problem "nohup: missing operand" [duplicate]

Hi I was trying to create an alias to run a shell script in background: alias inj=nohup ~/software/idea-IU/bin/idea.sh in my ~/.bashrc But as I type inj in terminal, I got nohup: missing operand error....
wayne's user avatar
  • 101
1 vote
0 answers
114 views

Setup alias to work immediately when created as root without a restart

I have created a shell script to install some software which runs as root. As part of this process it sets up an alias to point at a shell script to make it easier to run for the user. It does the by ...
saltedlolly's user avatar
2 votes
3 answers
6k views

How to give docker-compose alias to the new docker compose (v2) command?

I noticed that docker-compose 1.x is gently being dropped in favor of the new v2: https://www.docker.com/blog/announcing-compose-v2-general-availability/ So I then removed my docker-compose v1.x ...
s.k's user avatar
  • 1,138
0 votes
1 answer
368 views

XAMPP is not working on Ubuntu 20.04.4 LTS

I have been using XAMPP to work on personnal project using PHP. XAMPP used to work before when I first installed it but now there seems to be an issue that I can't seem to resolve. Here's what happens:...
Harpartap S C's user avatar
1 vote
1 answer
746 views

How to run an alias inside an alias in fish?

I aliased sudo to please with a space: $ alias please='sudo ' $ please ll I have tried this in Fish, but it doesn't work: $ alias please='sudo ' $ please ll sudo: ll: command not found
Octopus's user avatar
  • 43
0 votes
3 answers
131 views

How can I edit a command? [duplicate]

I'm trying to edit the clear command. I've tried going into the bin directory then doing: "gedit clear" but it ended in failure because I can't edit the file without potentially corrupting ...
UnderSc0r3's user avatar
0 votes
2 answers
294 views

Sudo aliased to please; how do i make please see aliases?

I made sudo see aliases with alias sudo='sudo '. I aliased sudo to please (alias please=sudo), and with please it didn't worked: alias please='please '. please still didn't see my aliases. How to make ...
user avatar
2 votes
2 answers
276 views

Is there any way to alias ";;" to "ll"?

I am a huge fan of aliases. this feature REALLY makes my life easier. I have the following alias set: alias ll="ls-lah" However, I frequently fatfinger ll to ;; As a solution, I attempted to ...
iTestStuff's user avatar
4 votes
2 answers
450 views

How to edit the aliases with which a program in Ubuntu is associated (and therefore will be returned in the search menu)

Pardon for for not having the correct terminology yet. When I press the Meta button, Ubuntu lets me search for programs. When I, e.g., search for 'sound' it shows me a list of settings, programs, etc. ...
DataScience's user avatar
0 votes
1 answer
360 views

Is it possible to allow NOPASSWD on an alias of a command requiring sudo?

I added this alias: alias shutdown2h='sudo shutdown -h +120' which I would like to run without having to enter the password but also without adding NOPASSWD for the whole shutdown command. Is it ...
Alin Anca's user avatar
0 votes
1 answer
45 views

Is there a way call an alias without separating it from previous characters?

Super new to all of this. Trying to do the overthewire wargames to learn and thought it was a bit tedious to log in to each level, and wanted to make some shortcuts. I made an alias that can take the ...
apep11's user avatar
  • 1
1 vote
1 answer
949 views

my .bashrc has a typo and I do not know how to fix it

I was trying to create an alias for a command, I added the alias to the bottom of .bashrc file but when I try to run source .bashrc I get: .bashrc (line 6): 'case' builtin not inside of switch block ...
Hasan Aga's user avatar
  • 199
0 votes
1 answer
141 views

Failing to connect apache2 with ScriptAlias

I'm trying to set up a ScriptAlias on an apache2 server, but when I try to connect to it using the alias, I get a Forbidden error: This is my /etc/apache2/apache.conf: cgi.load is enabled on /etc/...
dNyrM's user avatar
  • 113
14 votes
2 answers
2k views

Why doesn't the "watch" command work on an alias?

So I've made my customized alias command and tried to use it with alias, but my alias was not recognized while concatenated with the watch command. So I tried to make a thread of it and fortunately, ...
YoloWex's user avatar
  • 302
0 votes
2 answers
513 views

I can't find my alias file

Some time ago I created an alias which is still working (base) Mac-mini ~ % type Iridis Iridis is an alias for ssh ... I want to modify this alias but when I go to nano ~/.bashrc the file is empty. ...
Manuel Dominguez Becerra's user avatar
2 votes
1 answer
728 views

how to define a variable in .bashrc so i can use it as path

Hi ( sorry for my bad English ) I just learned how to permanently set a key for a specific value using alias: .bashrc alias please='sudo' alias go='cd' alias destroy='rm -rf' And it works perfectly ...
YoloWex's user avatar
  • 302
0 votes
1 answer
68 views

Bash Function/Alias name collision causes seg fault

The problem in this post also happened to me. mkdir crashes bash I couldn't comment there because no reputation. Can anyone elucidate why this happens? It happens at runtime Not when the function is ...
Zaira's user avatar
  • 1
1 vote
1 answer
227 views

Issues setting up bash autocomplete for Python3 alias

I've got an alias for python3, 'py' - it's set up as you might expect in my .bashrc file. alias py='python3' complete -F _python py The issue is that complete will only work if I try to complete with ...
Miku Tatukua's user avatar
7 votes
1 answer
1k views

How can I make a shell alias work immediately?

Defining and using an alias in the same line does not seem to work: $ alias x=ls; x x: command not found How can I "escape" x in the second call so that it is recognized as an alias?
bers's user avatar
  • 171
1 vote
1 answer
60 views

defining an alias is not recognized in other terminals [duplicate]

I was playing around with the command "alias" and I noticed that when I define an alias for copy to be c ( alias c="copy" ) it only work on that terminal, if I switch to another ...
moe_'s user avatar
  • 111
0 votes
1 answer
2k views

Why is my alias from .bashrc not working?

I've written a line in .bashrc alias untar='sudo tar –xvzf' Now, when I use "untar" in bash I get the error: untar filename.tar.gz tar: invalid option -- '�' Try 'tar --help' or 'tar --...
Mark Rensen's user avatar
7 votes
3 answers
2k views

How to make alias to systemctl with autocomplete

I tried alias sct='systemctl' complete -F _systemctl sct But the function _systemctl is not found until I run the original command systemctl in the session. This function loads dynamically or somehow ...
tehkonst's user avatar
  • 323
6 votes
4 answers
3k views

is it possible to alias a port number?

I want to run a service on a custom port (e.g. jenkins on 8080) and I prefer to access it via browser with a name I can remember, e.g. http://localhost:jenkins which will be an alias for http://...
CIsForCookies's user avatar
1 vote
4 answers
2k views

How I can run application from anywhere in the terminal without being in the full path

I have an application that I can run while I am in the file location as the below: -$ cd home/myApps/app -$ ./run.sh I want to call the run.sh from anywhere in my terminal without being in the full ...
MindC3ll's user avatar
0 votes
0 answers
27 views

I just installed Quixel and Nuke, how can I create an alias for them in Ubuntu? [duplicate]

I just installed Quixel Bridge and Nuke. They are not found in the application list so I have no way to drag them to desktop favorite. Nor did they like Google Chrome that could be started in terminal ...
Wendy's user avatar
  • 1
1 vote
1 answer
63 views

Handy command for editing previously executed mistyped command and overwriting history entry with the fixed one

until recently I was pretty sure that fc command opens previously executed command in the default editor, executes submitted changes and overwrites last entry from the bash history. However, seems ...
zeko868's user avatar
  • 31
1 vote
2 answers
460 views

alias settings nor working at logon

Newly installed hirsute = 21.04. Installed out of the package, created my own personal account, the default .bashrc is present in my homedir and to make sure there is a .bash_aliases too. Both mention ...
Karel Adams's user avatar
3 votes
2 answers
917 views

How to append date and text to a file as an alias?

I want to create an alias to append a dated note to a file. (The use case I want to reproduce : Sebastian Daschner - How to do effective note taking as developer. So far I was able to append the date, ...
Marc Bouvier's user avatar
3 votes
2 answers
515 views

How do I find the package providing an alias?

Using apt-file I am able to find the packages providing certain executables like this for example: sudo apt-file search {/bin,/sbin,/usr/bin/,/usr/sbin}/wget Well actually: sudo apt-file search {/bin,...
Forivin's user avatar
  • 358
0 votes
2 answers
492 views

How to excute several commands with one command [duplicate]

Usually I need to exceute several commands every time Im at work, start local server, start docker bash, run frontend service...and I wish I could do all those stuff with one single command. I tried ...
Anibal Cardozo's user avatar
-1 votes
1 answer
241 views

Alias with input [closed]

pretty new to linux and trying to create an alias that runs a python file here's how it goes. alias search=("cd /home/SET && python3 /home/SET/search.py") The only problem is that &...
MohaMoney's user avatar
0 votes
1 answer
676 views

Alias fails when defined in .bash_aliases on Ubuntu 20.04.2 over ssh with jump server

Spun up an AWS Ubuntu 20.04.2 server. This server sits behind a jump server. Once the server spun up, I ran: sudo update sudo upgrade As well as rebooted the server. After that, created an ~/....
Metro Smurf's user avatar
4 votes
1 answer
330 views

Set parameters for Ubuntu's alias

I have an example command as follows: g++ main.cpp -o main -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -I/usr/local/include/opencv4 Running the entire above command will create ...
Claire Duong's user avatar
0 votes
1 answer
50 views

alias not working as expected [closed]

I am trying to get file types using an alias. I am using: alias file-types="find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u" However, it is not working: When I type the ...
Ahmad Ismail's user avatar
0 votes
0 answers
1k views

Problem updating snaps on 20.04

A few days ago I tried to change my default python3 path from /usr/local/bin/python3 to /usr/bin/python3 on my Ubuntu 20.04 (Desktop Env => Gnome 3.36) by - creating a symlink to the desired path ...
atanughosh01's user avatar
0 votes
1 answer
1k views

How to input a password when using an alias

I am using sshpass in order to perform a scp command inside a pretty long script to run and I would like to be able to input a password in advance for this. It's pretty easy to use the password as a ...
Joseph Budin's user avatar
0 votes
2 answers
147 views

bash, get part of file limited by 2 strings based on grep

Here is input file (3 parts divided by ##). ## some info 1 aaa bbb ccc ## some info 2 ddd eee fff ## some info 3 ggg hhh iii I need get one or more parts of file based on search words based on ...
genderbee's user avatar
  • 830
2 votes
0 answers
317 views

After update to 21.04 my alias in bashrc no longer works

I have appended this alias in my .bashrc file: alias libreoffice="flatpak run org.libreoffice.LibreOffice/x86_64/stable" Prior to the update (from Kubuntu 20.10 to Kubuntu 21.04) this alias ...
Bruni's user avatar
  • 10.1k
3 votes
2 answers
422 views

How to create a CLI alias for a web search with W3M?

I would like to create an alias with the function to perform a DuckDuckGo search with W3M via the Command Line Interface (CLI). I have already created the alias and the DuckDuckGo search engine is ...
Teso's user avatar
  • 174

1
2 3 4 5
8