ThishVerse Logo
THISHVERSE
HomeBlogAboutContact
Back to all posts
DevOps

මොනවද මේ Linux Shell වර්ග?

Linux වල තියෙන Bash, Zsh, Fish, Dash වගේ Shells අතර වෙනස්කම්

HHirun Thishakya
October 2, 2026
5 min read
මොනවද මේ Linux Shell වර්ග?

Linux වල Terminal එක open කරලා අපි මෙහෙම command එකක් type කරනවා:

ls

Files ටික පෙන්වනවා.

ඊළඟට:

cd Projects

කියලා වෙන directory එකකට යනවා.

හැබැයි මේ commands තේරුම් අරගෙන execute කරන්නේ Terminal එකද?

නැහැ.

ඒ වැඩේ කරන්නේ Shell එක.

Linux වල එකම Shell එකක් විතරක් නැහැ. Bash, Zsh, Fish, Dash වගේ Shells කිහිපයක් තියෙනවා. ඒවායේ features, syntax සහ භාවිතා කරන අවස්ථා වෙනස්.

Shell එකක් කියන්නේ මොකක්ද?

Shell එකක් කියන්නේ user සහ operating system අතර command-based interface එකක් ලෙස වැඩ කරන command interpreter එකක්.

අපි මෙහෙම command එකක් දුන්නොත්:

mkdir myproject

Shell එක ඒ command එක කියවලා අදාළ program එක execute කරනවා.

Shell එක commands execute කරන එකට විතරක් සීමා වෙන්නේ නැහැ. Variables, conditions, loops, functions, pipes සහ redirection වගේ features භාවිතා කරලා shell scripts ලියන්නත් පුළුවන්.

සරලව:

You
 ↓
Terminal
 ↓
Shell
 ↓
Command / Program
 ↓
Linux

මෙතන Terminal එක සහ Shell එක දෙකක්.

Terminal එක කියන්නේ command line එක සමඟ interact වෙන්න ලබාදෙන application එක.

Shell එක තමයි අපි type කරන commands interpret කරන්නේ.


Linux වල Shells කිහිපයක් තියෙන්නේ ඇයි?

Shell එකෙන් Shell එකට design goals වෙනස්.

සමහර Shells:

  • Scripting සඳහා optimize කරලා තියෙනවා

  • Interactive terminal experience එකට focus කරනවා

  • Lightweight වෙන්න design කරලා තියෙනවා

  • Customization වැඩියෙන් ලබාදෙනවා

  • POSIX compatibility එකට focus කරනවා

ඒ නිසා Linux system එකක එකකට වඩා Shells install කරලා තියෙන්න පුළුවන්.


1. Bash

Bash එන්නෙ Bourne Again SHell කියන නමෙන්.

Linux වල වැඩිපුරම හමුවෙන Shells අතර Bash ප්‍රධාන තැනක් ගන්නවා.

Bash භාවිතා කරලා සාමාන්‍ය commands execute කරන්න වගේම automation සහ shell scripting කරන්නත් පුළුවන්.

උදාහරණයක්:

name="ThishVerse"
echo "Hello $name"

මෙ name කියන variable එකක් create කරලා ඒක echo command එකෙන් print කරනවා.

Bash බහුලව භාවිතා වෙන්නේ:

  • Linux administration

  • DevOps

  • Automation

  • Shell scripting

  • Server management

  • CI/CD

වගේ වැඩ වලට.

Linux ඉගෙනගන්න කෙනෙක්ට Bash ඉගෙනගැනීම ඉතා වැදගත් foundation එකක්.


2. sh

sh කියන්නේ සාම්ප්‍රදායික Bourne shell interface එකට භාවිතා කරන නමක්.

Modern Linux systems වල sh කියන්නේ එකම specific Shell implementation එකක් වෙන්න අනිවාර්ය නෑ.

උදාහරණයක් විදිහට Ubuntu වල:

ls -l /bin/sh

කියලා check කළොත් /bin/sh එක dash වෙත point වෙන බව දැකගන්න පුළුවන්.

ඒ නිසා මේක:

#!/bin/sh

කියන්නේ අනිවාර්යයෙන්ම Bash භාවිතා කරන්න කියන එක නෙමෙයි.

මෙයින් අදහස් වෙන්නේ system එකේ sh සඳහා configure කරලා තියෙන shell එක භාවිතා කරන්න කියන එකයි.

මේක shell scripting වලදී වැදගත්.


3. Dash

Dash කියන්නේ Debian Almquist Shell.

මේක lightweight සහ POSIX-oriented Shell එකක්.

Ubuntu වල /bin/sh සඳහා Dash භාවිතා කරනවා. Bash සාමාන්‍ය users සඳහා interactive login shell එක ලෙස වෙනම භාවිතා වෙන්න පුළුවන්.

Dash වගේ lightweight Shell එකක් system scripts සඳහා ප්‍රයෝජනවත්.

උදාහරණයක් ලෙස:

#!/bin/sh

වගේ script එකක් ලියනවා නම් Bash වලට විතරක් තියෙන features භාවිතා නොකර POSIX-compatible syntax භාවිතා කරන එක වැදගත්.

ඒ නිසා /bin/sh සහ /bin/bash එකම දෙයක් කියලා හිතන්නත් එපා.


4. Zsh

Zsh, එහෙමත් නැත්නම් Z Shell, developers සහ power users අතර ජනප්‍රිය Shell එකක්.

Zsh වල interactive terminal experience එක customize කරන්න ගොඩක් options තියෙනවා.

උදාහරණයක් විදිහට:

  • Advanced command completion

  • Command history

  • Custom prompts

  • Aliases

  • Plugins

  • Themes

වගේ features භාවිතා කරන්න පුළුවන්.

Zsh සමඟ Oh My Zsh කියන configuration framework එකත් ගොඩක් ජනප්‍රියයි.

Oh My Zsh කියන්නේ Shell එකක් නෙමෙයි.

ඒක Zsh configure සහ manage කරන්න භාවිතා කරන framework එකක්.


5. Fish

Fish කියන්නේ Friendly Interactive SHell.

නමෙන්ම අදහස් වෙන විදිහට Fish වල ප්‍රධාන focus එක user-friendly interactive terminal experience එකක් ලබාදීම.

Fish වල:

  • Syntax highlighting

  • Autosuggestions

  • Smart tab completion

  • Interactive features

  • Useful default configurations

වගේ features තියෙනවා.

උදාහරණයක් විදිහට command එකක් type කරනකොට Fish එක කලින් commands මත පදනම්ව suggestions පෙන්වන්න පුළුවන්.

හැබැයි Bash වලින් Fish වලට යනකොට වැදගත් වෙනසක් තියෙනවා.

Fish POSIX-compatible Shell එකක් නෙමෙයි.

ඒ නිසා Bash script එකක් Fish වලදී ඒ විදිහටම වැඩ කරයි කියලා assume කරන්න බැහැ.


6. Ksh

Ksh, හෙවත් KornShell, Unix systems සඳහා develop කරපු Shell එකක්.

Ksh වලින් interactive commands සහ shell scripts දෙකම run කරන්න පුළුවන්.

එහි:

  • Variables

  • Functions

  • Command history

  • Job control

  • Shell scripting

වගේ features තියෙනවා.

Ksh විශේෂයෙන් traditional Unix සහ enterprise environments වලදී හමුවෙන්න පුළුවන්.

ඒ නිසා පැරණි Unix systems හෝ existing enterprise scripts සමඟ වැඩ කරනකොට Ksh ගැන දැනගෙන ඉන්න එක ප්‍රයෝජනවත්.


7. Csh සහ Tcsh

තවත් Unix Shell family එකක් තමයි C Shell, සාමාන්‍යයෙන් csh ලෙස හඳුන්වනවා.

C programming language එකට සමාන syntax concepts කිහිපයක් එහි තියෙනවා.

Tcsh කියන්නේ Csh එකේ enhanced version එකක්. command-line editing සහ interactive features වගේ improvements එකතු කරලා තියෙනවා.

අද අලුත් projects සඳහා Csh/Tcsh තෝරාගැනීම සාමාන්‍ය දෙයක් නොවුණත්, පැරණි Unix environments සහ existing scripts වලදී ඒවා හමුවෙන්න පුළුවන්.


ප්‍රධාන Linux Shells අතර වෙනස

Shell

ප්‍රධාන ලක්ෂණය

Common Use

Bash

General-purpose + scripting

Linux, DevOps, Automation

sh

POSIX shell interface

Portable scripts

Dash

Lightweight POSIX shell

System scripts

Zsh

Customization + interactive features

Developers, Power users

Fish

User-friendly terminal experience

Interactive terminal use

Ksh

Unix scripting

Unix, Enterprise systems

Csh/Tcsh

C-like syntax

Older Unix environments


ඔයා දැනට භාවිතා කරන්නේ මොන Shell එකද?

ඔයාගේ current Shell එක ගැන බලන්න:

echo $SHELL

උදාහරණයක්:

/bin/bash

වගේ result එකක් ලැබෙන්න පුළුවන්.

හැබැයි මෙතන පොඩි වෙනසක් තියෙනවා.

$SHELL මඟින් සාමාන්‍යයෙන් ඔයාගේ configured login shell එක පෙන්වනවා.

දැනට running shell process එක ගැන බලන්න පුළුවන්:

ps -p $$ -o comm=

System එකේ තියෙන login shells බලන්න:

cat /etc/shells

Shell එක Change කරන්න පුළුවන්ද?

ඔව්.

උදාහරණයක් විදිහට Zsh install කරලා තියෙනවා නම්:

chsh

භාවිතා කරලා login shell එක වෙනස් කරන්න පුළුවන්.

ඒ වගේම Shell එක permanently change නොකර වෙන Shell එකක් temporarily start කරන්නත් පුළුවන්.

zsh

හෝ:

fish

ඊට පස්සේ:

exit

කළාම කලින් Shell එකට ආපහු යන්න පුළුවන්.


Terminal සහ Shell එක එකමද?

Terminal ≠ Shell

උදාහරණයක්:

GNOME Terminal
       ↓
      Bash
       ↓
      ls
       ↓
Linux filesystem

ඔයාට එකම Terminal application එක ඇතුළේ Bash, Zsh හෝ Fish run කරන්න පුළුවන්.

ඒ නිසා Shell එක මාරු කළා කියලා Terminal application එක මාරු වෙනවා කියලා අදහස් වෙන්නේ නැහැ.


Shell Script එකක් හැම Shell එකකම වැඩ කරනවද?

අනිවාර්යයෙන්ම නැහැ.

උදාහරණයක් විදිහට Bash-specific feature එකක් භාවිතා කරන script එකකට:

#!/usr/bin/env bash

වගේ shebang එකක් භාවිතා කරන්න පුළුවන්.

POSIX-compatible script එකකට:

#!/bin/sh

භාවිතා කරන්න පුළුවන්.

මේ වෙනස Linux servers, Docker, CI/CD සහ DevOps automation වලදී විශේෂයෙන් වැදගත්.

Tags:DevOpsLinuxLinux ShellBashZshFishDashShell ScriptingLinux AdministrationCommand Line

Did you find this article helpful?

Related Articles

View Post
Azure වලින් මොනවද කරන්න පුළුවන්?
Cloud Computing
October 7, 2026

Azure වලින් මොනවද කරන්න පුළුවන්?

Microsoft Azure කියන්නේ විවිධ විදිහෙ දේවල් ගොඩක් කරන්න පුලුවන් cloud platform එකක්.

View Post
Flutter සහ React Native
Programming
September 24, 2026

Flutter සහ React Native

Mobile App Development එකට හොද මොකක්ද?

View Post
AI එක උත්තර දෙන එකෙන් එහාට ගිහින් වැඩ කරන හැටි
Tech NewsFeatured
September 23, 2026

AI එක උත්තර දෙන එකෙන් එහාට ගිහින් වැඩ කරන හැටි

GPT-6 Astra කියන්නේ questions වලට answers දෙන AI එකකට වඩා එහා දෙයක්

ThishVerse Logo
THISHVERSE
|

© 2026 ThishVerse. All rights reserved.

PrivacyTerms
|By Thish
Comments (0)

Sign in to join the conversation

No comments yet. Be the first to comment!