Linux Practice Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1.

Locate Current file directories


2. Locate Current file directories with details
3. Locate Current file directories in reverse order
4. Locate Current file directories in reverse order by time stamp
5. Locate Current file directories in human readable format
6. Check index number
7. Check present working directory
8. Get absolute path of directory
9. Change to previous working directory path
10. Change to previous directory path
11. Change 2 steps before current working directory
12. Login as sudo user
13. Create new directory
14. Create new file with timestamp
15. Change access time
16. Change modification time
17. define time stamp for file name
18. change time stamp of file1 as file2
19. Pipeline operator to use first cmd output as input for 2nd cmd
20. Get stats of file
21. Login as root user
22. change permission for user-group-other as rwx-rwx-rwx
23. Add permission for user-group-other as rwx-rwx-rwx
24. Remove permission for user-group-other as rwx-rwx-rwx
25. Change permission as per other file
26. Change owner name of file as sudo
27. Change owner name of group as sudo
28. Change owner name of file
29. Current logged in users details
30. Current user details
31. Open file in read mode
32. Open file in edit mode
33. Append 2 files
34. Get details of mentioned cmd
35. Add new user as normal user
36. Add new user as sudo user
37. Add new user to sudo group
38. Remove recent added new user
39. Change user as normal user
40. Change other user as sudo user
41. Remove new directory
42. remove directory recursively
43. Get Host name of PC
44. Check running host status
45. Get Status of server
46. Get a mask code
47. Get IP address of host
48. Check OS details
49. copy file in Secured mode
50. Copy file in normal mode
51. Copy file with interactive mode (notified when already file available)
52. Copy file with getting original file’s permissions and time stamp
53. Change recursively permissions of newly copied files.
54. Move any file to other location
55. get indication if there is already file available
56. get backup ready while moving file
57. Rename file
58. Get details of word, lines and char count
59. Count characters only
60. Count lines only
61. Count words only
62. Open file with Page wise forward mode
63. Open file with Page wise both directional mode
64. Get top 10 lines of file
65. Get specific line numbers of lines from file
66. Get bottom 10 lines of file
67. Get specific numbers of bottom lines from file
68. Get sheel type details
69. history of commands used in session
70. Use echo fn to print specific words
71. Get details of Recently generated 2 files
72. How to get records from line number 300 to 400 from 500 lines file ?
73. Get current month calender
74. Get current year calender
dir home file

ABC PQR XYZ LMO

EFG TEST1 TEST2 RST DEMO1 DEMO2


log1 log2 trial1 trial2

1. Ctrl +D - save and close.


2. Ctrl +C - Kill process
3. Q - to exit from any window
4. Explain layers of linux -
a. Karnel - User to Hardware - Heart of linux and help to connect between hardware
and software.
b. Shell - BIOS same as windows intermediator of Karnel and application
c. Application - final request forwarded to application
d. User - end user.
5. What is shell -
a.
6. What is Karnel -
a.
7. Types of users -
a. Root user
b. Normal user
c. Sudo user
8. Types of file permission -
a. Read
b. Write
c. Execute
9. What is LFS - Linux file system
10. Details after running cmd of ls -l -
a. Permission
b. owner
c. Group
d. Size
e. date
f. Time
g. File_name
11. If error received as file not found, provide solution -
a. Acknowledge the error
b. Check log files for further details
c. Login to server with putty
d. Login as sudo user to gain access
e. Enter file directory
f. Use cmd ls -lrt to get file details in reverse order sorted by time stamp

12.

You might also like