You are on page 1of 2

Lecture 3

1. Vim: is a simple text editor like notepad where we can write or edit anything.
Some Options of Vim: (for using these options use esc key)
➢ I: for insert
➢ Vim “file-name”. “extension”: for to open file
➢ :q for Exit without saving
➢ :q! for force quit
➢ :w for Save
➢ :wq for Save & exit
➢ DD for delete last line undo
➢ UU for redo
➢ :set number print line numbers
➢ :/”word” for to search any word
➢ :%s/”word”/”new-word” for to search and replace
➢ :%s/”word”/”new-word”/gc for to search and replace to ask for yes

2. GCC: is a C or C++ compiler


• gcc “File-Name”.c -o “File-Name” for compile code of C
• ./“File-Name” run code of C

3. Make File to Create and load Module


• firstly, we write the simple code of c for module
• Now we create the code for to start Module with the help of Make file.

obj-m += “File-Name”.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

• make “File-Name”. ko
• insmod “”
• After that write make on terminal.
4. Permission
• chmod 777 “file-name” for allow all users to read write everything.
• chmod 666 “file-name” for don’t allow all users to read write everything.
• And Some other Below are in the table:

You might also like