Internal and External Commands, System Files

Internal Command

Internal commands are commands that are built into the command line interpreter (CLI) of an operating system, such as the Windows Command Prompt or the Unix/Linux shell. They are also sometimes referred to as "built-in commands" or "shell commands".

Internal commands are executed directly by the CLI, without the need to call an external program or script. They are typically used for tasks that are frequently performed, or for tasks that are closely integrated with the operating system.

Some examples of internal commands include: 

  • cd: Changes the current working directory.
  • dir: Lists the files and directories in a directory.
  • echo: Displays a message or the value of a variable.
  • set: Sets or displays the value of a shell variable.
  • time: Displays or sets the system time.

There are many other internal commands that are specific to different operating systems and command line environments. To see a list of the internal commands available in your system, you can try typing help or man followed by the name of the command line interpreter (e.g. help or man cmd in Windows, or man bash in Unix/Linux).

External commands

External commands are commands that are not built into the command line interpreter (CLI) of an operating system, but are instead provided by external programs or scripts. They are also sometimes referred to as "external utilities" or "external commands".

External commands are executed by calling the program or script that implements the command. They are typically used for tasks that are less frequently performed, or for tasks that are not closely integrated with the operating system.

To execute an external command, you must provide the name of the program or script, along with any required arguments or options. The command line interpreter will then search for the program or script in a predefined list of directories, and execute it if it is found.

Some examples of external commands include:

  • grep: Searches for patterns in text.
  • find: Searches for files or text within files.
  • sort: Sorts the lines of text in a file or output.
  • uniq: Removes duplicate lines from a sorted file.
  • tr: Translates or deletes characters in a text stream.
  • sed: Modifies text by applying a set of rules.
  • awk: Processes text by applying a set of rules to each line.
  • perl: A general-purpose programming language often used for text processing.

There are many other external commands available, depending on the specific operating system and command line environment being used. Some external commands are provided as part of the operating system, while others can be downloaded and installed from third-party sources.

System Files

System files are files that are essential for the operation of an operating system. They include files that contain system-level components, such as the kernel, device drivers, and system libraries, as well as files that contain system settings and configuration data.

In general, system files should not be modified or deleted by the user, as doing so can cause serious problems with the operation of the system. It is generally recommended to leave the management of system files to the operating system itself, or to a system administrator with the appropriate knowledge and expertise.

Some common examples of system files include:

  • The kernel: The central component of an operating system, responsible for managing hardware resources and executing user programs.
  • Device drivers: Special programs that allow the operating system to communicate with hardware devices, such as printers, keyboards, and disk drives.
  • System libraries: Shared code libraries that provide common functionality to multiple programs.
  • System settings and configuration files: Files that contain settings and preferences for the operating system and various system components.
  • System log files: Files that contain records of system events and messages.

System files in Windows, Unix, and Linux are similar in that they are all essential for the operation of the operating system. However, there are some differences in the types of system files that are present and the way that they are used.

In Windows, system files include the kernel (ntoskrnl.exe), device drivers, system libraries, system settings and configuration files, and system log files. These files are typically stored in system-specific directories, such as %windir% or %systemroot%.

In Unix and Linux, system files include the kernel (e.g. vmlinuz), device drivers, system libraries, system settings and configuration files, and system log files. These files are typically stored in system-specific directories, such as /system, /etc, or /var.

Some common examples of system files in Unix and Linux include:

  • /etc/passwd: A file that contains user account information, including the user's name, user ID, group ID, home directory, and default shell.
  • /etc/group: A file that contains information about user groups, including the group name, group ID, and list of members.
  • /etc/fstab: A file that contains information about the filesystems that are available on the system, including the device file, mount point, filesystem type, and mount options.
  • /etc/rc.d: A directory that contains system startup scripts for various runlevels.
  • /var/log/syslog: A log file that contains records of system events and messages.

The location and names of system files can vary depending on the specific operating system being used. In general, system files are stored in system-specific directories, such as /system or /etc in Unix/Linux systems, or %windir% in Windows systems.

Again, these are just a few examples of the many types of system files that are present in Unix and Linux systems. The specific system files present on a particular system will depend on the specific operating system and its configuration.

Here are some examples of common system files, along with a brief description of their purpose:

  • kernel: The central component of an operating system, responsible for managing hardware resources and executing user programs.
  • ntoskrnl.exe (Windows): The kernel for the Windows NT operating system.
  • vmlinuz (Linux): The kernel for the Linux operating system.
  • hal.dll (Windows): The Hardware Abstraction Layer for the Windows operating system, responsible for abstracting hardware differences and providing a consistent interface to device drivers.
  • libc.so (Linux): The C standard library, which provides a wide range of functions for handling input/output, memory allocation, and other common tasks.
  • system.conf (Linux): A configuration file that contains system-wide settings and preferences.
  • win.ini (Windows): A configuration file that contains system-wide settings and preferences for the Windows operating system.
  • syslog (Linux): A log file that contains records of system events and messages.
  • eventvwr.exe (Windows): A utility for viewing system log files in the Windows operating system.

These are just a few examples of the many types of system files that exist. The specific system files present on a particular system will depend on the specific operating system and its configuration.

Click here for previous notes of Computer Fundamentals

Click here for Lok Sewa Computer Operator mock test

Post a Comment

0 Comments