A command that gives username@hostname:pwd
Not a single command as far as I know, but this does what you need:
echo "$(whoami)@$(hostname):$PWD"
You could make that into an alias by adding this line to your shell's rc
file (~/.bashrc
, or ~/.zshrc
or whatever you use):
alias foo='echo "$(whoami)@$(hostname):$PWD"'