Assignment 1 - Linux Commands

docx

School

Georgian College *

*We aren’t endorsed by this school

Course

1004

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

4

Uploaded by ConstableUniverseHyena44

Report
Assignment 1: Lab 1 - Linux Commands 24W Data Systems Architecture - 01 Submitted by: Anksha Kumari Student id:200579691 Submitted to: Roya Barzegar Q1. Create a folder in a directory in your Linux operating system and name it with your first name. Answer. Command used =$ mkdir anksha_kumari, for creating a folder in Linux operating system. Q2. Create a text file called yourname.txt in the folder you created in Step 1 and place some text in it using any text editor tool. Answer. Create the text file : Use the vi command to create the text file named "yourname.txt". This Command opens the vi-text editor and creates a new file named "yourname.txt" if it does not already exist. If the file already exists, vi opens it for editing. Command used to create text file = # vi anksha_kumari.txt Add text to the file: 1. Press i to enter insert mode. 2. Type or paste your text. Press Esc to exit insert mode. Save changes and exit vi: 1. Type: wq and press Enter and exit vi . 2. To exit without saving, type: q! and press Enter
Verify the content of the file: Use the cat command to view the contents of the file. Command used to view the contents of file: # cat anksha_kumari.txt. This displays Hello, I am Anksha Kumari Q3. Change file permissions. Answer: To change the file permissions, I use chmod command followed by 777 and the name of the file to change its permissions. To change the permissions of a file: # chmod 777 anksha_kumari.txt Verify the Permissions: To verify that the permissions have been changed successfully, I can use the ls-l command to list the file’s permissions. View the permissions of a file: # ls-l.
Q5. We went over the most important Linux commands in class but there are many more. Try to find a Linux command that we did not cover in class, but you find it useful. Describe the command and use it in an example and take a screenshot showing the usage. Answer: The command $ free is one that hasn't been used in the class. There may be situations where we want to install a large new application and want to know how much free memory the system has. The free command in Linux can be used to display the total amount of free space available as well as various additional information including the amount of memory used, the system's swap memory, and the kernel's buffers. Knowing this command came in handy for me while working. Syntax : $ free [options]
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help