From the course: Complete Guide to Navigating Linux: Working with Users, Files, and Networks

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Lesson 1 lab solution: Discovering Linux

Lesson 1 lab solution: Discovering Linux

- [Instructor] Okay, so I'm already logged in, and let me use whoami to find out who I am. I'm user student. So next you need to find out which directory you are in. That would be pwd for print working directory. Then we need to get an overview of all files and directories in that directory. Let's use ls -ad, -a so that we also see hidden files, and -d so that we can see names of directories. Oh no, the d in this current situation doesn't make sense because it will show you properties of the current directory. So ls -a is what we need. Compare that to ls - ad * then it does make sense. Next, we are going to copy the file etc passwd to the current directory, cp /etc/passwd to dot. Dot is the current directory. And then we need to rename it to users. That would be mv passwd to users. And now it is renamed. And finally, we need to move this file to the tmp directory. Mv users to /tmp is going to do that for us. And that's all. We're done.

Contents