Skip to main content

Command Palette

Search for a command to run...

🐧 Linux File Types

Updated
β€’1 min readβ€’View as Markdown
S
Aspiring DevOps Engineer passionate about cloud technologies and automation. Skilled in AWS, Docker, Kubernetes, Terraform, Ansible, Linux, Git, Jenkins, Python, and CI/CD. Dedicated to building scalable, secure, and reliable cloud infrastructure through Infrastructure as Code, automation, and DevOps best practices.

One of the most interesting concepts in Linux is that everything is treated as a file. This includes not only regular documents but also hardware devices, directories, and even certain system configurations. This unified approach makes Linux simple and powerful to work with.

Some commonly used Linux commands for working with files are:

  • ls – List files and directories
  • cp – Copy files or directories
  • mv – Move or rename files
  • rm – Remove files or directories
  • cat – Display the contents of a file

Types of Files in Linux

πŸ”Œ Device Files

Device files represent hardware devices and allow Linux to interact with them just like regular files.

πŸ“‚ Location: Most device files are stored in the /dev directory.

Examples:

  • /dev/sda β†’ Hard disk
  • /dev/tty β†’ Terminal device
  • /dev/null β†’ Discards all data written to it
  • /dev/random β†’ Generates random data
32 views