CD tutorial: Top 3 ways to CHANGE DIRECTORY in ubuntu TERMINAL

First published at 14:11 UTC on July 5th, 2019.
subscribers

cd() {

# change directory
# print current directory (replace $HOME with ~)
# ls

if [[ $1 = - ]]; then
command cd "$OLDPWD" || return 1
else
command cd "$@" || return 1
fi

ls
echo "${PWD/~/'~…

MORE
CategoryScience & Technology
SensitivityNormal - Content that is suitable for ages 16 and over
DISCUSS THIS VIDEO