I have installed HDP 2.5 and I am able to login into sandbox in cent using root uname and hadoop password but how would I start working with hadoop components like pig,hive and all, Do I need to install all hadoop compnents and configure it or it is configured and installed by default? How would I get a prompt of pig, hive spark, scala and all? also I am unable to login into Ambari using admin/admin uname password?
Did you follow the instructions on how to change the sandbox password for admin? This question shows how to reset your ambari password after you login with root: https://community.hortonworks.com/questions/15063/default-usernamepassword-for-ambari.html
To learn how to start all those tools CLIs, in the same place you went to download the sandbox (https://hortonworks.com/downloads/#sandbox), you can see a link for tutorials: https://hortonworks.com/tutorials/
That's the best place to start with. Also, search through similar questions in HCC.
If it helped, please vote/accept answer.