Linux में कमांड लाइन बुनियाद
8 Questions
0 Views

Linux में कमांड लाइन बुनियाद

Created by
@SnappyMagnolia

Questions and Answers

कमांड लाइन की क्या विशेषता है?

  • यह टेक्स्ट कमांड का उपयोग करके ऑपरेटिंग सिस्टम के साथ इंटरैक्ट करने का तरीका है। (correct)
  • यह केवल फाइलों को देखने की अनुमति देता है।
  • यह केवल सिस्टम को रिबूट करने की अनुमति देता है।
  • यह ग्राफिकल इंटरफेस है।
  • 'pwd' कमांड का क्या उपयोग है?

  • फाइलों को डिलीट करना।
  • एक नया फोल्डर बनाना।
  • डिस्क स्पेस उपयोग दिखाना।
  • वर्तमान डायरेक्टरी का नाम प्रदर्शित करना। (correct)
  • 'cd' कमांड का सही उपयोग क्या है?

  • नया फोल्डर बनाना।
  • फाइल कॉपी करना।
  • फाइल डिलीट करना।
  • वर्तमान निर्देशिका बदलना। (correct)
  • 'chmod' कमांड का क्या कार्य है?

    <p>फाइल की अनुमतियाँ बदलना।</p> Signup and view all the answers

    'kill' कमांड का उपयोग किसके लिए किया जाता है?

    <p>प्रोसेस को समाप्त करना।</p> Signup and view all the answers

    'man' कमांड का क्या कार्य है?

    <p>कमांड का मैनुअल प्रदर्शित करना।</p> Signup and view all the answers

    'top' कमांड क्या करती है?

    <p>रियल-टाइम में सिस्टम प्रोसेस की निगरानी करती है।</p> Signup and view all the answers

    'ls -a' कमांड का क्या अर्थ है?

    <p>सभी फाइलें और डायरक्टरी दिखाएँ।</p> Signup and view all the answers

    Study Notes

    Command Line Basics in Linux

    • What is the Command Line?

      • Interface for interacting with the operating system using text commands.
      • Provides control over files, processes, and system configuration.
    • Terminal vs. Shell

      • Terminal: The application used to access the command line.
      • Shell: The command line interpreter (e.g., Bash, Zsh).
    • Basic Commands

      • pwd: Print working directory - shows the current directory.
      • ls: List files and directories in the current directory.
        • Options: -l (long format), -a (include hidden files).
      • cd: Change directory.
        • Usage: cd [directory_path].
        • .. to go one directory up.
      • mkdir: Create a new directory.
        • Usage: mkdir [directory_name].
      • rmdir: Remove an empty directory.
      • rm: Remove files or directories.
        • Usage: rm [file_name] or rm -r [directory_name] for recursive deletion.
    • File Operations

      • cp: Copy files or directories.
        • Usage: cp [source] [destination].
      • mv: Move or rename files or directories.
        • Usage: mv [source] [destination].
      • cat: Concatenate and display file content.
        • Usage: cat [file_name].
      • more and less: View file content page by page.
      • nano, vim: Text editors for editing files in the terminal.
    • File Permissions

      • Permissions represented as rwx (read, write, execute).
      • Command: chmod to change file permissions.
        • Usage: chmod [permissions] [file_name].
    • Process Management

      • ps: Display current processes.
      • top: Monitor system processes in real-time.
      • kill: Terminate processes.
        • Usage: kill [process_id].
    • System Information

      • uname: Display system information.
      • df: Show disk space usage.
      • free: Display memory usage.
    • Getting Help

      • man [command]: Show manual for a command.
      • --help: Common option to get usage information (e.g., ls --help).
    • Command Chaining

      • ;: Execute multiple commands sequentially.
      • &&: Execute the second command only if the first succeeds.
      • ||: Execute the second command only if the first fails.
    • Tab Completion

      • Pressing the Tab key auto-completes file names and commands, improving efficiency.
    • Environment Variables

      • Variables that affect the shell's behavior; view with echo $VARIABLE_NAME.
      • Common variables: PATH, HOME, USER.
    • Scripting Basics

      • Shell scripts: Collection of commands in a text file.
      • Make executable with chmod +x [script_name].
      • Execute with ./[script_name].

    कमांड लाइन की मूल बातें लिनक्स में

    • कमांड लाइन क्या है?
      • टेक्स्ट कमांड्स के माध्यम से ऑपरेटिंग सिस्टम के साथ इंटरैक्ट करने के लिए इंटरफेस।
      • फाइलों, प्रक्रियाओं और सिस्टम कॉन्फ़िगरेशन पर नियंत्रण प्रदान करता है।

    टर्मिनल और शेल

    • टर्मिनल: कमांड लाइन तक पहुँचने के लिए उपयोग किया जाने वाला एप्लिकेशन।
    • शेल: कमांड लाइन इंटरप्रेटर (जैसे, Bash, Zsh)।

    बुनियादी कमांड्स

    • pwd: कार्यशील निर्देशिका प्रदर्शित करता है।
    • ls: वर्तमान निर्देशिका में फाइलों और निर्देशिकाओं की सूची।
      • विकल्प: -l (लंबा प्रारूप), -a (छिपी हुई फाइलें सहित)।
    • cd: निर्देशिका बदलने के लिए उपयोग किया जाता है।
      • उपयोग: cd [directory_path].. एक स्तर ऊपर जाने के लिए।
    • mkdir: नई निर्देशिका बनाने के लिए।
      • उपयोग: mkdir [directory_name]
    • rmdir: ख़ाली निर्देशिका हटाने के लिए।
    • rm: फाइलों या निर्देशिकाओं को हटाने के लिए।
      • उपयोग: rm [file_name] या rm -r [directory_name]Recursive हटाने के लिए।

    फाइल संचालन

    • cp: फाइलों या निर्देशिकाओं की कॉपी करने के लिए।
      • उपयोग: cp [source] [destination]
    • mv: फाइलों या निर्देशिकाओं को स्थानांतरित करने या नाम बदलने के लिए।
      • उपयोग: mv [source] [destination]
    • cat: फाइल की सामग्री को जोड़ना और प्रदर्शित करना।
      • उपयोग: cat [file_name]
    • more और less: फाइल की सामग्री को पन्नों में देखने के लिए।
    • nano, vim: टर्मिनल में फाइलों को संपादित करने के लिए पाठ संपादक।

    फाइल अनुमतियाँ

    • अनुमतियाँ rwx (पढ़ने, लिखने, निष्पादित करने) के रूप में प्रदर्शित होती हैं।
    • कमांड: chmod फाइल की अनुमतियाँ बदलने के लिए।
      • उपयोग: chmod [permissions] [file_name]

    प्रक्रिया प्रबंधन

    • ps: वर्तमान प्रक्रियाओं को प्रदर्शित करता है।
    • top: वास्तविक समय में सिस्टम प्रक्रियाओं की निगरानी करता है।
    • kill: प्रक्रियाओं को समाप्त करने के लिए।
      • उपयोग: kill [process_id]

    सिस्टम जानकारी

    • uname: सिस्टम की जानकारी प्रदर्शित करता है।
    • df: डिस्क स्थान उपयोग दिखाता है।
    • free: मेमोरी उपयोग प्रदर्शित करता है।

    सहायता प्राप्त करना

    • man [command]: किसी कमांड के लिए मैनुअल दिखाता है।
    • --help: व्यवहारिक सूचना प्राप्त करने के लिए सामान्य विकल्प (जैसे, ls --help)।

    कमांड चेनिंग

    • ;: एक से अधिक कमांड को अनुक्रम में निष्पादित करता है।
    • &&: दूसरा कमांड केवल तभी निष्पादित होता है जब पहला सफल हो।
    • ||: दूसरा कमांड केवल तभी निष्पादित होता है जब पहला विफल हो।

    टैब पूरा करना

    • टैब कुंजी को दबाने से फाइल नाम और कमांड में स्वतः पूर्णता होती है, जो दक्षता को बढ़ाती है।

    पर्यावरण चर

    • वे चर जो शेल के व्यवहार को प्रभावित करते हैं; echo $VARIABLE_NAME से देखें।
    • सामान्य चर: PATH, HOME, USER

    स्क्रिप्टिंग मूल बातें

    • शेल स्क्रिप्ट: एक टेक्स्ट फ़ाइल में कमांडों का संग्रह।
    • निष्पादन करने योग्य बनाने के लिए chmod +x [script_name] का उपयोग करें।
    • निष्पादित करने के लिए ./[script_name] का उपयोग करें।

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    यह क्विज़ लिनक्स के कमांड लाइन बुनियादों पर केंद्रित है। इसमें टर्मिनल और शेल के बीच के अंतर, साथ ही कुछ मूलभूत कमांड जैसे pwd, ls, cd, mkdir, और rm के उपयोग के बारे में जानकारी है। इन कमांड्स का सही तरीके से उपयोग करना सीखें और अपनी क्षमता बढ़ाएं।

    Use Quizgecko on...
    Browser
    Browser