Vijay learns the filesystem
No C: drive, no backslashes — how Linux organises everything
On day 2, Vijay needed to find the application config file. On Windows he knew where to look: Program Files, AppData, or the Registry. On Linux he had no idea.
His colleague Priya explained the Linux filesystem layout in 10 minutes.
EVERYTHING IS UNDER / (called root)
On Windows you have C: D: E: separate drive letters. On Linux everything is one tree starting from /.
Windows: C:\Windows\System32
Linux: /usr/lib or /usr/binWindows: C:\Program Files\Apache\
Linux: /opt/apache/ or /usr/local/apache/Windows: C:\Windows\Temp
Linux: /tmpWindows: C:\Users\vijay\
Linux: /home/vijay or ~THE KEY DIRECTORIES:
/etc contains ALL config files. Think of it as the Registry but as plain readable text files.
ls /etc/ # see all config files
cat /etc/hosts # like Windows hosts file (exact same purpose!)
cat /etc/hostname # the machine name
cat /etc/os-release # Linux version info
ls /etc/nginx/ # nginx config directory
ls /etc/systemd/system/ # service definitions (like Services.msc entries)/var/log contains ALL log files. Think Event Viewer but as text files.
ls /var/log/ # see all log categories
tail -f /var/log/syslog # system log (like Windows System event log)
tail -f /var/log/auth.log # login attempts (like Windows Security event log)
ls /var/log/nginx/ # nginx access and error logs/opt is where third-party applications live. Like Program Files but simpler.
ls /opt/ # see installed apps
ls /opt/tomcat/ # Tomcat installation/home is user home directories. Like C:\Users\
ls /home/ # see all users
cd ~ # go to your own home directoryNO DRIVE LETTERS - MOUNT POINTS INSTEAD
On Windows, a second disk becomes D:. On Linux, it gets mounted as a folder:
df -h
# /dev/sda1 50G 30G 20G 60% / (main disk)
# /dev/sdb1 200G 45G 155G 22% /var (second disk mounted as /var)
# /dev/sdc1 2T 500G 1.5T 25% /data (data disk)FILE PATHS - FORWARD SLASHES, NO BACKSLASHES
Windows: C:\Users\vijay\Documents\report.txt
Linux: /home/vijay/documents/report.txtWindows: .\logs\app.log (relative path)
Linux: ./logs/app.log (relative path, same concept, forward slash)HIDDEN FILES start with a dot:
ls /home/vijay/ # shows normal files
ls -la /home/vijay/ # shows hidden files too
cat /home/vijay/.bashrc # user shell configPERMISSIONS:
ls -la /opt/myapp/config.xml
# -rw-r--r-- 1 tomcat appteam 4096 Mar 16 config.xml
#
# - = file (d would be directory)
# rw- = owner can read and write
# r-- = group can read only
# r-- = everyone else can read onlychmod 644 config.xml # set permissions (like Security tab in Properties)
chown tomcat:appteam file # change owner (like Change Owner in Properties)
sudo chmod 755 /opt/myapp/ # need sudo to change others filesVijay found the app config in /etc/myapp/app.conf in under a minute once he knew the structure. All configs in /etc, all logs in /var/log, all apps in /opt.
/etc contains all config files — think of it as the Registry but readable text files you can cat, grep, and diff
/var/log contains all log files — this is your Event Viewer, organised by application and service
/opt is where third-party apps live (like Program Files), /home is user folders (like C:/Users)
Linux uses forward slashes not backslashes, and hidden files start with a dot
df -h shows all mounted filesystems — there are no drive letters, disks mount as folders