Terminal :- To open a terminal Press CTRL+ ALT + t keys together(As Shorcut).
Command
1. Calendar (cal) :- The cal command is used to display a calendar of any specific month or entire year.
2. Date (date) :- Another utility command is date; it is used to display the system date.
3. Calculator(bc) :- The bc command in linux is a command line calculator.
The ibase function allow us to set the numbering system.
(a) obase = 16
(b) obase = 2
(c) sqrt = (256)
4. echo :- The echo command is used to display a message on the terminal.
eg :- $echo Hi,Welcome to techonespot.
5. Changing password (passwd) :- It is used to change the password of the current login account by default.
eg :- $passwd
6.Clearing the Screen (clear) :- we have one simple solution for this problem, use the clear command to remove data on the screen.
7. Present Working Directory (pwd) :- The directory where we are located at that moment is known as current directory or present working directory. To know the current directory we can use the pwd command.
eg :- Spwd
8.Creating a Directory (mkdir) :- A directory in Linux can be created using the mkdir command. The command takes the name of the directory to be created as its argument.
eg :- $mkdir subject
9. Change Directory (cd) :- We can change a specific directory using the cd command.
eg :- $cd subject
eg :- $mkdir math science economics
10. Create a file using cat command :- $cat > introduction
Concatenating multiple files using cat command
The cat command can also be used to concatenate the contents of multiple files and store it in another file. The syntax of using the concatenation is shown below :
$cat file1 file2 > file3
11. Deleting a File (rm) :-The rm command is used to delete/remove one or more files.
eg :- $rm introduction
To delete multiple file
eg :- $rm file1 file2 file3
12.The symbol * is known as wildcard character.
13.$cat > .introduction Learning Ubuntu Linux is fun....
TO end the file :- [CTRL + d]
14. Copying a file (cp) :- It creates an exact replica of a file on the disk at the location specified by the user. The cp command needs at least two arguments.
15.Renaming files and/or moving files (mv) Changing the name of a file or directory is another operation that user performs regularly. The mv command is used for renaming a file or directory.
eg :- $mv file1 file2 my_dir
16. Compare two files (cmp) :- If the two files compared differ in contents then the byte and line number at which the first dissimilarity occurred is reported.
17. Counting lines, words and characters in a file (wc):- The wc command is used to count the number of lines, words, and characters in the specified file or files.
18.Ordering Output (sort) :-The sort command is used to order the data stored within a file in ascending or descending sequence at the time of display.
19. Pattern matching (grep) :- The grep command performs similar operation from the command line interface. The command is based on a fundamental idea of search globally for a regular expression and display lines where instances are found
MCQ
1. Which of the following command is used to count the total number of lines, words, and characters contained in a file?
(a) countw (b) wcount (c) Wc (d) wordcount
2. Which of the following command is used to remove files?
(a) dm (b) rm (c) delete (d) erase
(3) Which of the following command is used to remove the directory?
(a) rdir (b) remove (c) rd (d) rmdir
(4) Which of the following command is used to count just the number of lines contained in a file?
(a) wc - r (b) wc - w (c) wc - c (d) wc - 1
(5) The command chmod 761 letter is equivalent to which of the following access
rights?
(a) chmod u=7, g = 6, 0 = 1
(b) chmod a = 761
(c) schmod u = rws, g = rw, o = x
(d) chmod 167
6. Which of the following refers to the maximum length of a filename in Linux?
(a) 8 (b) 10 (c) 200 (d) 255
(7) The hierarchy of a series of directories branching in a user system starts from which of the following directories?
(a) home (b) \root (c) home (d) /root
(8) Which of the following command is used to copy a file?
(a) tar (b)cpio (c) cp (d) copy
(9) Which of the following command is used to display your current working directory?
(a) path (b) pwd (c) prompt $pg (d) dir
(10) Which of the following command is used for searching a pattern in a file?
(a) grep (b) find (c) lookup (d) All of the above
(11) Which of the following is not a redirection symbol?
(a) > (b) < (c) * (d) >>