Linux Commands

Linux uses a command-line interface (CLI) for system management, file operations, and network administration. Below are essential Linux commands for beginners.

File & Directory Commands

CommandDescriptionExample
lsLists files in a directoryls /home
ls -lLists files in detaills -l
cdChanges directorycd Documents
cd ..Moves up one levelcd ..
pwdDisplays current directorypwd
mkdirCreates a new directorymkdir NewFolder
rmdirDeletes an empty directoryrmdir OldFolder
rm -rDeletes a directory & filesrm -r FolderName

File Management Commands

CommandDescriptionExample
touchCreates an empty filetouch file.txt
cpCopies a filecp file1.txt /backup/
mvMoves or renames a filemv file1.txt Documents/
rmDeletes a filerm file.txt
catDisplays file contentcat file.txt
nanoOpens file in Nano editornano file.txt
headDisplays first 10 lines of a filehead file.txt
tailShows last 10 lines of a filetail file.txt

User & Permission Commands

CommandDescriptionExample
whoLists logged-in userswho
idDisplays user ID (UID, GID)id
chmodChanges file permissionschmod 755 file.sh
chownChanges file ownershipchown user:group file.txt
passwdChanges user passwordpasswd

Process Management Commands

CommandDescriptionExample
psShows running processesps aux
topDisplays system resource usagetop
killKills a processkill PID
pkillKills a process by namepkill firefox
htopInteractive process managerhtop (install required)
Qus. 1 : Which of the following is a Linux command?

  1. Chmod
  2. curl
  3. df
  4. all
Qus. 2 : Command to create file in Linux is...........?

  1. copycon
  2. cat
  3. dir
  4. All of the above
Qus. 3 : Which command is used to check Linux version?

  1. uname -a
  2. uname-n
  3. uname-s
  4. kernel
Qus. 4 : True statement about 'chown' command in Linux is

  1. Creates a thread
  2. Creates a child process
  3. Changes the mode of operation to kernel mode
  4. Changes the users and/or group ownership of each given file
Qus. 5 : Which commands will give you information about how much disk space each file in the current directory uses?

  1. Is-1
  2. ls -la
  3. du
  4. ls -a
Qus. 6 : Which command is used for removing files in the Linux operating system ?

  1. delete
  2. rm
  3. dm
  4. erase
Qus. 7 : <p>Match the following Linux commands with their correct functions.</p><p><br></p><table class="table table-bordered"><tbody><tr><td><b>Commands</b></td><td><b>Functions</b></td></tr><tr><td>1. ls</td><td>A. Deletes a file</td></tr><tr><td>2. rm</td><td>B. Copies files from one location to another</td></tr><tr><td>3. mkdir</td><td>C. Displays a list of files and directories</td></tr><tr><td>4. cp</td><td>D. Creates a new directory</td></tr><tr><td><br></td><td>E. Removes a directory</td></tr><tr><td><br></td><td>F. Moves a file</td></tr></tbody></table><p><br></p>

  1. 1-B, 2-C, 3-A, 4-D
  2. 1-D, 2-E, 3-B, 4-A
  3. 1-C, 2-A, 3-D, 4-B
  4. 1-F, 2-D, 3-C, 4-E

Programs

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad