nerdexam
Linux_Foundation

LFCS · Question #664

Which of the following commands can be used to display the inode number of a given file?

The correct answer is B. ls. The ls command can be used to display the inode number of a given file.

Submitted by cyberguy42· Apr 18, 2026Essential Commands

Question

Which of the following commands can be used to display the inode number of a given file?

Options

  • Ainode
  • Bls
  • Cln
  • Dcp

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    92% (36)
  • D
    5% (2)

Why each option

The `ls` command can be used to display the inode number of a given file.

Ainode

`inode` is a filesystem concept representing a data structure that stores information about a file or directory, not a command to display its number.

BlsCorrect

The `ls` command, when used with the `-i` option (`ls -i`), will display the inode number associated with a file or directory.

Cln

The `ln` command is used to create hard or symbolic links to files, it does not display inode numbers.

Dcp

The `cp` command is used to copy files and directories, not to display their inode numbers.

Concept tested: Displaying file system metadata (inode)

Source: https://linux.die.net/man/1/ls

Topics

#ls command#inode#file attributes#file system

Community Discussion

No community discussion yet for this question.

Full LFCS Practice