***************************Basic Linux Command With teacher*********************
pwd // present working directory
ls // list
ls -a // list all
cd // to change directory ("mnt/c/Users/Administrator/Desktop$")
mnt // mounted to acces drives
cd /mnt/c // to go on to c drive
touch // to create any file after u gone on wherever folders u wanted to.
clear // to clean the screen
cd // to default directory
nona // to Write data in ur file [nano filename]
cat // to open the written file [cat filename]
mkdir // to create folders or directory\[mkdir foldername]
rmdir // to remove folder[rmdir fo;dername]
rm [OPTION]... [FILE]... // to remove anything
cd.. // to go back
cp // to copy what is in the file to other files [cp filenaem foldername]
grep // used to search some file word [grep searchingtext name filename.txt]
chmod // used to give permistion / chmod [OPTION]. MODE[,MODE]. FILE.
way 1 [chmod u=rwx,g=rx,o=r filename.txt]
7 = Write , Read & Execute
6 = Read & Write
5 = Read & Execute
4 = Read
2 = Write
1 = Execute
0 = no permission
way 2 [chmod 754 filename]
wc[wc -w filename.txt] //To count the word that we use in our file we use the
[wc -l filename.txt] // you want to count the number of lines
[ wc -m filename.txt]// you want the count the number characters in the file
[wc filename.txt]// you want all the information in a single command
ls -lgF // used for to allow you to see the file/folder permition and other info
**********************************End of the document***********************
# basic linux excerise
1 mount to your disktop?
2 Creat a file called"sample.txt"
3 insert information a depicted below
- Name : your name
- department : CS
- CGPA to be calculate
4 Creat a new diretory called "File holder"
5 copy sample.txt file to file holder?
6 remove directory we created on step 4?
7 change the mode of file via "chmod" command?
8 count the number of words of the sample.txt file
9 search the word 'Tsedey' from the file by using "grep" command
====================================
NB :- to visualize the changes ine the file use another appropriate command.
=========================================DAY
THREE================================================================
THE way to install c in ubuntu (step by step)
1. u have to update the system using the ubuntu cmd( "sudo apt update ")
2. now, after the system update is done. u have to install language compiler of any
kind using the cmd(" sudo apt install gcc and sudo apt install g++") it is better
if u install both for better library.
3. now, after successfull instalation of the compiler u have to write files using
their own extenssion file format in this case ours is ".c" the command is as
follow;
-----> use touch to write files
-----> compile the file
-----> run the the compile file
4. to compile created file containing c language use cmd ("gcc -o <file name>" )
5. to display the code or outputuse cmd (" ./<file name>")