Multiple choice technology testing

How do you change the current directory to /usr/local/bin in UNIX?

  1. mv /usr/local/bin

  2. cd /usr/local/bin

  3. setdir /usr/localbin

  4. cd usr/local/bin

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The cd command changes directories in UNIX. Option B uses the correct absolute path /usr/local/bin. Option D is incorrect because without the leading slash, it would try to change to a relative subdirectory.