How do I change the user/owner associated with file1? # chown user02 file1 The group association is also that user's primary group. You can see that the user account that created the resources also owns those resources. The long format contains both permissions and ownership. The ls -l command displays directory contents in long format. How do I display permission, owners, and groups? # ls -l In the playground directory, display the current owner and group associated with the Resources directory and the files. How do I create several files at once? # touch file2 file3 file4 How do I manage ownership and groups? How do I create a file named file1? # touch file1 The -p option creates parent directories as needed to complete the path. Note: The goal here is to create the 2020data directory, but the given path's data directory does not yet exist. How do I create a directory path (a series of directories that don't yet exist)? # mkdir -p Resources/data/2020data How do I create a directory named Resources? # mkdir Resources The touch command is one of many ways to create files. Use the mkdir command to create directories. Use rm -fR /playground, userdel user01, and groupdel groupA to remove the resources. When you've completed the article and learned the techniques I've covered, delete the two user accounts, the groups, and the playground directory. You are ready to work with the commands and concepts below. In your home directory, create a new directory named playground: # mkdir playgroundĬhange into the ~/playground directory by using the cd command. Note: You would use the passwd user01 command to set the user's password. Note that you do not need to configure passwords for the users in this exercise, as you won't log on with those accounts. It's best to do this on a virtual machine rather than your personal Linux box, but these tasks are relatively harmless.Ĭreate two new users and two new groups to work with. You can use the following commands to set up a playground. With that in mind, I'll assume you have a couple of identities and resources to experiment with as you read the rest of the article. That means that the things that I write are usually structured as some sort of lab or other hands-on opportunity. I've been in IT for about 25 years, and most of that time was spent as a technical trainer. Red Hat OpenShift Service on AWS security FAQ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |