Day 3: Skeleton of Linux and Basic Commands
Hello everyone.
Day 3: Skeleton of Linux and Basic Commands
Hello everyone.
In this post, I am going to write about the basic skeleton of a Linux system and some basic Linux commands. By skeleton, I mean the basic directory structure of Linux and why those directories exist.
Understanding this is very important, because in Linux everything is organized in a specific way, and once you understand this structure, Linux starts to make sense.
Linux Filesystem Skeleton
Linux follows a standard filesystem hierarchy.
Everything in Linux starts from the root directory, which is represented by /.
Unlike Windows, Linux does not have drives like C:, D:, etc. All files and directories are organized under /.
Important Directories and Their Purpose
/
This is the root of the filesystem. Every file and directory in Linux exists under this directory.
/bin
This directory contains essential binary executables.
These are basic commands required for the system to work, even in single-user mode.
Examples:
- ls
- cp
- mv
- rm
- cat
These commands are available for all users.
/sbin
This directory contains system binaries.
These are mostly administrative commands used by the root user.
Examples:
- ip
- mount
- reboot
- shutdown
Normal users usually do not need these commands.
/etc
This directory contains configuration files.
Almost every service or application stores its configuration here.
Examples:
- /etc/passwd — user information
- /etc/group — group information
- /etc/hostname — system hostname
- /etc/systemd/ — systemd configuration
In Linux, configuration is mostly done by editing text files.
/home
This directory contains home directories of users.
Each user has a separate directory inside /home.
Example:
- /home/kiran
User-specific files, downloads, documents, and settings are stored here.
/root
This is the home directory of the root user.
It is different from /home/root.
/var
This directory contains variable data.
These files change frequently while the system is running.
Examples:
- /var/log — system logs
- /var/cache — cache files
- /var/spool — print jobs, mail queues
/tmp
This directory contains temporary files.
Files here are usually deleted automatically after reboot.
Applications use this directory for temporary storage.
/usr
This directory contains user applications and libraries.
It includes:
- /usr/bin — user commands
- /usr/lib — libraries
- /usr/share — shared data
Most installed applications reside here.
/lib
This directory contains shared libraries required by binaries in /bin and /sbin.
Without these libraries, basic commands will not work.
/proc
This is a virtual filesystem, not a real directory on disk.
It provides information about:
- running processes
- kernel
- system memory
- CPU
Examples:
- /proc/cpuinfo
- /proc/meminfo
These files are generated by the kernel.
/dev
This directory contains device files.
In Linux, hardware devices are represented as files.
Examples:
- /dev/sda
- /dev/null
- /dev/tty
This follows the idea that everything in Linux is a file.
Basic Linux Commands
Now let us look at some basic commands that are used frequently.
pwd
Prints the present working directory.
pwd
ls
Lists files and directories.
ls
ls -l
ls -a
cd
Used to change directory.
cd /etc
cd ..
cd ~
mkdir
Creates a directory.
mkdir test
mkdir -p dir1/dir2
touch
Creates an empty file.
touch file.txt
cp
Copies files or directories.
cp file1 file2
cp -r dir1 dir2
mv
Moves or renames files.
mv file1 file2
mv file /tmp
rm
Deletes files or directories.
rm file
rm -r dir
This command is dangerous if used incorrectly.
cat
Displays file content.
cat file.txt
less
Used to view large files.
less file.txt
Press q to quit.
man
Displays the manual page of a command.
man ls
This is one of the most important commands.
메타데이터
- post_id
- edb99f8933bc
- slug
- day-3-skeleton-of-linux-and-basic-commands-edb99f8933bc
- url
- https://medium.com/@namburichandradurgakiran2006/day-3-skeleton-of-linux-and-basic-commands-edb99f8933bc
- canonical_url
- https://medium.com/@namburichandradurgakiran2006/day-3-skeleton-of-linux-and-basic-commands-edb99f8933bc
- author_url
- https://medium.com/@namburichandradurgakiran2006
- status
- ok
- fetched_at
- 2026-07-13 15:51:14