Question

Login to Suse Linux as root. Complete the task working as the root user. 1. What...

Login to Suse Linux as root. Complete the task working as the root user.

1. What is your current directory. What did you enter at the command prompt to determine your current working directory?

2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use one of the three types of help available in Linux to determine what option to use with the cat command to make line numbers appear. What did you enter at the commanand prompt?

3. Without changing directories display the /etc/passwd file. What did you enter at the command prompt?

Did you use an absolute or relative address(path)?

4. Use the grep command to display only the lines of the /etc/passwd file that contain the word false. What did you enter at the command prompt?

5. (Still in the /root directory) Make a directory named Expenses2020. What did you enter at the command prompt?

6. Using an absolute path, change to the /home directory, What did you enter at the command prompt?

7. Do a long list of the files of the /home (current) directory. What command did you use?                                                                              What option did you use?

8. Change to the student directory using a relative path. What did you enter at the command prompt?

9. A variable named OSTYPE is set at startup by the operating system.

When you enter:

echo The operating system is OSTYPE

it should display:              The operating system is linux

What do you need to add so the shell displays linux instead of the characters OSTYPE?

Change back to your home directory (/root)

10. Enter a command to display the last 2 lines of your food file (found in /root). What did you type in at the command prompt?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 1
***********
pwd

Answer 2
**********
vi food

Pizza
burger
pasta
bread
sandwitch
puff
noodles
salads
fried rice
cake

:wq

cat -n food

Answer 3
***********
cat /etc/passwd

absolute path
An absolute path is defined as the specifying the location of a file or directory from the root directory(/).

relative path
.(a single dot) - this represents the current directory.
..(two dots) - this represents the parent directory.

Answer 4
***********
grep -w false /etc/passwd

Answer 5
***********
mkdir Expenses2020

Answer 6
***********
cd

or

cd /home

from anywhere you press cd you will be throw to home directory

Answer 7
************

ls -l /home

Answer 8
***********
cd ../student

Answer 9
**********
first set OSTYPE=Linux for temporary session

madhav@siftworkstation:~$ OSTYPE=Linux
madhav@siftworkstation:~$ echo "The operating system is $OSTYPE"
The operating system is Linux
madhav@siftworkstation:~$cd /root

Answer 10
***********
tail -n 2 food


if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
Login to Suse Linux as root. Complete the task working as the root user. 1. What...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Open a new terminal window. Become the root user. Ensure you are the root user by...

    Open a new terminal window. Become the root user. Ensure you are the root user by issuing the “id” command on the command line. What is the uid number? _________________________________ Change directory to /home. Check that all your users have home directories. What command(s) did you use to do this?

  • Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume...

    Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume you are started at your home directory. Perform a command that displays the absolute path of your home directory (your current location). Create a new directory inside your home directory and name it “Assignment-3” Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and...

  • 2. Answer the correct command instructions to complete the following: a. What is the admin account...

    2. Answer the correct command instructions to complete the following: a. What is the admin account (username) you created in Lab 1 and write down its home directory (full folder name)? [0.5 pts) b. Assume the following directory structures in your home directory: • /home/(username)/ — use your own (home directory) • /home/(username) /Dir1.0/Dir1.1/ • /home/(username) /Dir2.0/Dir2.1/ in your home directory, create directories Dir1.0 & Dir 2.0, then create directories Dirl.1 & Dir2.1 inside other directories according to above. [1...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • Task 1: Using the adduser Command Execute the following commands in the root command-line environment: #...

    Task 1: Using the adduser Command Execute the following commands in the root command-line environment: # ls /home # adduser newuser1 # ls /home Contrast the contents of home before and after the adduser command. ? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # cd /home/newuser1 # ls -al # tail -n 5 /etc/passwd What is the absolute path of newuser1's home directory? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- What is the default shell for newuser1? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # tail -n 5 /etc/shadow Contrast the newuser1 record with your...

  • Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS...

    Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS that you set up from Question 1. Assume you are started at your home directory. a) Perform a command that displays the absolute path of your home directory (your current location). b) Create a new directory inside your home directory and name it “Assignment-Two” c) Without moving into the directory you just made (staying in your home directory), create three new directories using one...

  • Using Ubuntu OS... help is greatly needed! Thank you. Create an alias called "home" that does...

    Using Ubuntu OS... help is greatly needed! Thank you. Create an alias called "home" that does two things... returns you to your home directory, then does a long listing of all files found there Create a file called "Output.txt" that contains the output of the "ls /etc" command Using "cat", create a file called "poem.txt" where you enter at least one line of text ("Mary had a little lamb" will do...) Using "cat", pipe the contents of poem.txt into the...

  • A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not...

    A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not really a stream of characters and doesn't contain anything at all. True False Relative pathnames begin with the root directory. True False Running the ls -a command uniquely identifies directories and binary executables. True False What is the result of running mkdir -p share/man/cat1 from the command line? a. It creates the directory share. b. It creates the directory share/man. c. It creates the...

  • 1. Use what we learned today to get familiar with the Linux directory structure. Explain the...

    1. Use what we learned today to get familiar with the Linux directory structure. Explain the usage of all directories directly under the root directory. For example, • /home: it contains the home directories of all users

  • Problem 1 Write a BASH script to create a user account from the Linux system on...

    Problem 1 Write a BASH script to create a user account from the Linux system on which your script is run. The script should process two positional parameters. First positional parameter is supposed to be a string with a user name (e.g., user_name) Second positional parameter is supposed to be a string with a user password (e.g., user_password) In your script: Check if two positional parameters were passed to your script when it was invoked If NOT, print an appropriate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT