Score:0

Alias path not found on Ubuntu

cn flag

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"
source ~/.bashrc

When running kind on the terminal, it throw this error:

-bash: .//home/XXXX/kubeflow/kind: No such file or directory

What is the error here ?

Score:4
ru flag

Your use of ./ in your path is wrong. That implies a relative path from the current directory you're in, and is not necessary.

$HOME defaults to the fully qualified path for your home directory (i.e. /home/USERNAME/) and you do NOT need the ./ in the beginning of the path in your alias.

Score:0
vu flag

as answered your path is wrong, since it's starting with ./.

still, Recommended practice is to add binary path in $PATH env. instead of creating alias

PATH=$PATH:/$HOME/kubeflow

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.