I am not able to navigate to the specified path to get jenkins password.
intialAdminPassword is a file not a directory, so you can’t
cd to it, you also can’t execute it which is what
is trying to do
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
to list the content of the file.