Podcast
Questions and Answers
ما هي الطريقة لعرض قائمة الأوامر السابقة في الطرفية؟
ما هي الطريقة لعرض قائمة الأوامر السابقة في الطرفية؟
- استخدام الأمر commands
- استخدام الأمر log
- استخدام الأمر show
- استخدام الأمر history (correct)
كيف يمكن تنفيذ أمر موجود في قائمة الأوامر السابقة؟
كيف يمكن تنفيذ أمر موجود في قائمة الأوامر السابقة؟
- باستخدام علامة التعجب ! قبل الرقم (correct)
- باستخدام نجم * قبل الرقم
- بكتابة رقم الأمر فقط
- بكتابة الأمر بالكامل مرة أخرى
ماذا سيظهر عند تنفيذ الأمر history في الطرفية؟
ماذا سيظهر عند تنفيذ الأمر history في الطرفية؟
- إعدادات الشبكة
- قائمة الملفات الموجودة
- تاريخ النظام الحالي
- قائمة الأوامر التي تم تنفيذها (correct)
ما هو الأمر لعرض التاريخ في النظام؟
ما هو الأمر لعرض التاريخ في النظام؟
ما هي نتيجة تنفيذ الأمر ls في الطرفية؟
ما هي نتيجة تنفيذ الأمر ls في الطرفية؟
ما هي ميزة استخدام واجهة الأوامر النصية (CLI) مقارنةً بالواجهات الرسومية؟
ما هي ميزة استخدام واجهة الأوامر النصية (CLI) مقارنةً بالواجهات الرسومية؟
كيف يمكن لواجهة الأوامر النصية أن تسهل الأتمتة؟
كيف يمكن لواجهة الأوامر النصية أن تسهل الأتمتة؟
ما هي إحدى الفوائد الرئيسية لاستخدام واجهة الأوامر النصية؟
ما هي إحدى الفوائد الرئيسية لاستخدام واجهة الأوامر النصية؟
ما الذي يتم تمريره إلى الطرفية عند إدخال أمر؟
ما الذي يتم تمريره إلى الطرفية عند إدخال أمر؟
ما هو تأثير استخدام واجهة الأوامر النصية على سرعة الأداء؟
ما هو تأثير استخدام واجهة الأوامر النصية على سرعة الأداء؟
ما هو المقصود بحروف الـ Glob؟
ما هو المقصود بحروف الـ Glob؟
أي من الرموز يعد رمز Glob؟
أي من الرموز يعد رمز Glob؟
لماذا يتم استخدام حروف الـ Glob في الشيل؟
لماذا يتم استخدام حروف الـ Glob في الشيل؟
ما هو الأمر الذي يعرض المسار الحالي للصدفة؟
ما هو الأمر الذي يعرض المسار الحالي للصدفة؟
ما هي الدالة المستخدمة لعرض المتغيرات في نظام لينكس؟
ما هي الدالة المستخدمة لعرض المتغيرات في نظام لينكس؟
أي من الخيارات التالية يُعتبر خطأ عن استخدام حروف الـ Glob؟
أي من الخيارات التالية يُعتبر خطأ عن استخدام حروف الـ Glob؟
أي من الخيارات التالية ليس جزءًا من المسار $PATH المعروض؟
أي من الخيارات التالية ليس جزءًا من المسار $PATH المعروض؟
أي من الرموز التالية يُعتبر رمز Glob أيضًا؟
أي من الرموز التالية يُعتبر رمز Glob أيضًا؟
ماذا يسمى الحرف المستخدم للإشارة إلى أنماط بواسطة 'globbing'؟
ماذا يسمى الحرف المستخدم للإشارة إلى أنماط بواسطة 'globbing'؟
أي مما يلي يعتبر صحيحًا بشأن المتغير $PATH؟
أي مما يلي يعتبر صحيحًا بشأن المتغير $PATH؟
ماذا يفعل أمر ls عند إعطائه اسم دليل كوسيلة جلب؟
ماذا يفعل أمر ls عند إعطائه اسم دليل كوسيلة جلب؟
ما هي صيغة الأوامر التي يتم استخدامها في سطر الأوامر؟
ما هي صيغة الأوامر التي يتم استخدامها في سطر الأوامر؟
أي من الخيارات التالية يعد استخدامًا صحيحًا لأمر ls؟
أي من الخيارات التالية يعد استخدامًا صحيحًا لأمر ls؟
ما الهدف من استخدام الخيارات مع الأوامر؟
ما الهدف من استخدام الخيارات مع الأوامر؟
ما هو الناتج المتوقع عند تنفيذ الأمر ls في الدليل /etc/ppp؟
ما هو الناتج المتوقع عند تنفيذ الأمر ls في الدليل /etc/ppp؟
ما الذي يحدث عندما يتم استخدام $1 و $PATH في العبارة المحددة؟
ما الذي يحدث عندما يتم استخدام $1 و $PATH في العبارة المحددة؟
كيف يمكنك جعل $PATH يتم تفسيره كمتغير بينما لا يتم تفسير $1؟
كيف يمكنك جعل $PATH يتم تفسيره كمتغير بينما لا يتم تفسير $1؟
ما النتيجة عند استخدام الأمر التالي: echo "The service costs $1 and the path is $PATH"؟
ما النتيجة عند استخدام الأمر التالي: echo "The service costs $1 and the path is $PATH"؟
ما هي القيمة التي سيظهرها $PATH إذا كان مستخدمًا في الأمر المذكور؟
ما هي القيمة التي سيظهرها $PATH إذا كان مستخدمًا في الأمر المذكور؟
ما الذي سيحدث إذا تم استخدام $1 و $PATH في علامات تنصيص مزدوجة؟
ما الذي سيحدث إذا تم استخدام $1 و $PATH في علامات تنصيص مزدوجة؟
Flashcards
أمر ls
أمر ls
أمر يُستخدم لعرض محتويات دليل معين.
المسار الكامل للدليل
المسار الكامل للدليل
المسار الكامل للدليل الذي تريد عرض محتوياته.
الخيارات
الخيارات
خيارات إضافية تُستخدم لتعديل سلوك الأمر.
أوامر متعددة الوسائط
أوامر متعددة الوسائط
Signup and view all the flashcards
محتويات الدليل
محتويات الدليل
Signup and view all the flashcards
أمر history
أمر history
Signup and view all the flashcards
أمر history
أمر history
Signup and view all the flashcards
إعادة تنفيذ أمر من قائمة history
إعادة تنفيذ أمر من قائمة history
Signup and view all the flashcards
علامة تعجب (!)
علامة تعجب (!)
Signup and view all the flashcards
رقم الأمر من قائمة history
رقم الأمر من قائمة history
Signup and view all the flashcards
نظام الأوامر
نظام الأوامر
Signup and view all the flashcards
الأوامر في نظام الأوامر
الأوامر في نظام الأوامر
Signup and view all the flashcards
أهداف أوامر نظام الأوامر
أهداف أوامر نظام الأوامر
Signup and view all the flashcards
مزايا نظام الأوامر
مزايا نظام الأوامر
Signup and view all the flashcards
بناء جملة أوامر نظام الأوامر
بناء جملة أوامر نظام الأوامر
Signup and view all the flashcards
الحرف البري
الحرف البري
Signup and view all the flashcards
استخدام حروف البري
استخدام حروف البري
Signup and view all the flashcards
علامة الاستفهام (?)
علامة الاستفهام (?)
Signup and view all the flashcards
علامة النجمة (*)
علامة النجمة (*)
Signup and view all the flashcards
إظهار الحرف البري على الشاشة
إظهار الحرف البري على الشاشة
Signup and view all the flashcards
مسار shell الحالي
مسار shell الحالي
Signup and view all the flashcards
أوامر shell
أوامر shell
Signup and view all the flashcards
echo $PATH
echo $PATH
Signup and view all the flashcards
PATH
PATH
Signup and view all the flashcards
:
في PATH
:
في PATH
Signup and view all the flashcards
نص بين علامتي اقتباس مفردة
نص بين علامتي اقتباس مفردة
Signup and view all the flashcards
متغير PATH
متغير PATH
Signup and view all the flashcards
متغير $PATH
متغير $PATH
Signup and view all the flashcards
متغير $1
متغير $1
Signup and view all the flashcards
طريقة التعامل مع $1 و $PATH كمتغيرات
طريقة التعامل مع $1 و $PATH كمتغيرات
Signup and view all the flashcards
Study Notes
Module 05: Command Line Skills
- This module covers the basics of the command line interface (CLI), including the shell, commands, variables, command types, quoting, and control statements.
- The Linux community promotes the CLI for its power, speed, and ability to accomplish tasks with single commands, especially for server environments that do not require graphical interfaces.
- The CLI provides precise control, speed, and easier automation through scripting. This makes Linux users highly productive almost instantly.
Command Line Interface
- The CLI is a powerful tool for interacting with a computer's operating system.
- It allows users to perform tasks via commands rather than a graphical user interface.
- The CLI is beneficial for tasks that require precise control or speed.
The Shell
- The shell is a command-line interpreter which converts commands typed by the user to actions performed by the operating system.
- It's a crucial part of the CLI.
- Linux allows many different shells, and the most common is the Bash shell. This shell has features such as command history, inline editing, scripting, aliases, and variables for storing information for the shell and the user itself, enabling many commands to be completed.
The Prompt
- The prompt displays information about the user and system.
- A typical structure includes username, system name(hostname), and current directory. The
~
symbol represents the user's home directory.
Commands
- A command is a software program that executes an action on the computer when run in the CLI
- To execute a command, type its name and press Enter.
- Some commands require additional input like options and arguments to work correctly.
Arguments
- Used to specify what the command should act upon.
- For example, if
ls
(list directory contents) is given a directory name as an argument, it lists that directory. - Some commands may accept multiple arguments.
Options
- Options modify how commands behave.
- They often use single letters (e.g.,
-l
for a long listing) or complete words (e.g.,--help
). - Options can be used in conjunction with each other.
Commands Types
- Commands are categorized as internal (built-in) or external (stored elsewhere).
- Using the
type
command, you can find out a command's type.
Internal Commands
- These commands are built into the shell.
cd
(change directory) andls
(list directory contents) are examples.
External Commands
- These are commands stored in files.
- You can use
which
to find the location of an external command. The location is stored in an environment variable called thePATH
variable, a very important variable, which contains a list of directories where the system looks for programs.
Aliases
- An alias creates a shortcut for a longer command.
- You can set aliases using the
alias
command. - You can delete an alias using the
unalias
command.
Functions
- Functions let you group several commands into a single command.
- They are often loaded from shell initialization files when the shell starts up.
Variables
- Variables are used to store data.
- There are two types: local (temporal/lost when the terminal is closed) and environment (global/system wide.)
Globbing
- Glob characters (wildcards like
*
and?
) are symbols with special meaning in the shell. - They can be used as patterns to match filenames.
- Using glob characters, you can control commands and affect multiple files at once.
Quoting
- Quoting characters (
"
,'
) prevent the shell from interpreting special characters in the string. "
(double quotes) stop the shell from interpreting special characters in strings.'
(single quotes) stop the shell from interpreting special characters at all, including glob characters.\
(backslash) can be used to escape special characters in the string.
Control Statements
- Control statements allow for running multiple commands simultaneously or conditionally.
- Important control statements include semicolon (;), double ampersand (&&) and double pipe (||).
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.