0

I wanted to create a directory and access it after creation in a single command chain using:

mkdir directory_name && cd directory_name

is there a better way to do it that is built-in in linux without the need of creating a function to achieve that?

to be able to make a directory and access it without repeating the directory name?

1 Answers1

0

here is how to do it based on the answer i have found:

mkdir directory_name && cd "$_"