# Day 3 Task: Basic Linux Commands

In this article, we will be discussing the Basic Linux commands.

To view what's written in a file.

There are five ways you can view a file that is cat, nl, less, head, tail

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681897712549/5f3e99d7-4f3d-4278-9cf8-d987e8a9e4a4.png align="center")

To change the access permissions of files.

We have different permissions first we will look into it.

0 = 0 = Nothing

1 = 1 = execute

2 = 2 = write

3 = 2 + 1 = write + execute

4 = 4 = read

5 = 4 + 1 = read + execute

6 = 4 + 2 = read + write

7 = 4 + 2 + 1 = read + write + execute

so whenever you write chmod 777 filenames that means your user has the right to read, write and execute the file.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681898289698/43ddb4c2-735e-4573-bca5-dcc6a9c95767.png align="center")

To check which commands you have run till now.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681898405531/025402b2-1da6-4e4c-8cc9-4a33c6734155.png align="center")

To remove a directory/ Folder.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681898540926/b81242dc-5cc2-429b-990c-eb0a040a72ab.png align="center")

To create a fruits.txt file and to view the content

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681898636081/c7809334-f21e-423f-804a-6c737dea09fc.png align="center")

To Show only the top three fruits from the file

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681900457889/b6db6dc9-2558-4895-b665-6e75b8ff6016.png align="center")

To Show only the bottom three fruits from the file

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681900494373/6187c275-924d-4ec6-ad34-1e60b183df35.png align="center")

To create another file Colors.txt and to view the content.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681900570434/82304ec1-a1cf-4b9b-ae78-c4f76e59b161.png align="center")

To find the difference between the fruits.txt and Colors.txt file

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681900646392/d70ea70a-38a1-44bb-bc3e-a87c45e6acee.png align="center")
