FEDORA 31 BASIC

Fedora 31


Fedora is a linux operating system which shows more paths than windows. So, in programming we are using Fedora as the OS system. Before starting the programming we have to understand the basic codes and basic functions in Ferdora. 


01. Opening the terminal- Once you log in to the Fedora, go to the Activities > Menu> Utilities> Terminal

                  or

Activities>Menu>Search for the Terminal

02. Creating a File- consider typing vi myFirstText.txt and press Enter.
 This will create a file named "myFirstText" and the extension of that file is .txt


After creating the .txt file it will take you to the inside of the file. Though you opened the txt file it will not alow you to type until you press the Insert button. As an example I typed Every person is beautiful. It'll appear as below.


When you press the Insert key, it'll appear on the left side of the bottom of the window .


After you've done inserting letters, press Esc key and then type :wq! and then press Enter. This will save what you've type and quit from the current file.


If you want to quit without saving, just type :q! instead of typing :wq! 
If you want to just save what you've type, just type :w! instead if typing :wq!


03. Opening a saved file- If I need to open the above saved file, I should type  vi myFirstText.txt and press Enter. Remember to put extension unless it will appeared as the file you need to open doesn't exist. in the bottom of the file it will show a message like this, (According to the following picture)
           "myFirstText.txt" 1L,53C written
In the quoted text, the name of the file is displayed, and 1L means how many lines have been used to type in this file. 53C is a character counter.


04. Find the directory- In order to find the directory which you are currently in, just type pwd and press Enter.


05. Get a list of files on the current directory- Just type ls and press Enter. 
 

06. Get a list of every file in the localhost- Just type ls(space)-al and press Enter.


07. Clear the commands and everything on the terminal.- Just type clear and press Enter. Then it'll appear as below.


08. Create a  folder in current directory-                                       Type cd (space) Foldername. As an example I created a folder named 'LANGUAGE'. After that just type pwd in order to confirm the folder has been created.


09. Go back from the current directory- Type cd(space).. and then press Enter. If you want to confirm you've gone back, just type pwd again and check the directory.


10. Get a copy from the created file and rename it- Just type 
cp currentName.txt(space)newName.txt
As an example 
cp myFirstText.txt(space)LINEAR.txt (According to the below example).

In order to confirm, just type vi newName.txt
According to the exampe I'm writing
vi LINEAR.txt

11. Delete a file- Just type rm(space)filename.extension
According to my example, if I need to delete LINEAR.txt file, I should type rm LINEAR.txt

12. Delete all the files in the current folder/directory- Just type rm(space)*

13. Delete a folder- Type rmdir(space)folderName




----If everything is gone just press ctrl+c----










Comments

Popular posts from this blog

EXPLAINED ANSWERS FOR IP MID-TERM MODEL QUESTIONS

JAVA PROGRAMMING LANGUAGE