0% found this document useful (0 votes)
12 views10 pages

Introduction System Administration 1

Uploaded by

Yahya Alamri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views10 pages

Introduction System Administration 1

Uploaded by

Yahya Alamri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

‫ مكي حسين عبد الرحيم‬.‫د‬.

‫م‬ System Administration 1214/4/12

The lecture covers

 Introduction,
 Types of CLI,
 Operating system command-line interfaces,
 Application command-line interfaces

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

System administrators—also known as sysadmins—are information technology (IT) professionals


who make sure an organization’s computer systems are functioning and meet the needs of the
organization. Sysadmins support, troubleshoot, and maintain computer servers and networks.

What is system administration? Tasks and responsibilities

A system administrator’s job description might include:


 Managing Windows, Linux, or Mac systems
 Upgrading, installing, and configuring application software and computer hardware
 Troubleshooting and providing technical support to employees
 Creating and managing system permissions and user accounts
 Performing regular security tests and security monitoring
 Maintaining networks and network file systems

How to be a system administrator

Becoming a system administrator will entail learning some specialized skills. Earning a
certification can bring you needed experience and enhance your resume.

Skills you need as a system administrator

As a sysadmin, you’ll need to develop a core set of skills that will allow you to make sure the
computer systems in your organization are running smoothly. Here are the top skills that you’ll
want on your resume:
 In-depth knowledge of operating systems: Whether it’s Windows, Linux, or Mac, hiring
managers generally look for competency in administering the operating system used in their
company. Windows and Linux operating systems have been widely embraced and are good
systems to start with, though it’s a good idea to check if your industry favors one over others.

1
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

 Familiarity with hardware: Working physical devices—such as servers or printers—will be an


important part of a system administrator's job.
 Cloud computing skills: Familiarity with cloud applications like Office365, Google Cloud
Platform, and AWS can give you a boost in the hiring process.
 Knowledge of networks: Being able to set up and maintain Local Area Networks (LAN) and
Wide Area Networks (WAN), in addition to setting up network security features like firewalls, are
often expected of system administrators. This might often be the case at smaller companies, where
IT professionals are expected to wear many hats.
 Communication and interpersonal skills: In addition to working on a team, sysadmins will often
be expected to help other employees that don’t have the same technical knowledge, through help
desk support or other means. Being able to communicate well will be a key part of a system
administrator’s successful day-to-day tasks.

Types of CLI,

What Is Command Line Interface? Learn the Basics in One Go

From the latest programming languages and operating systems (OS) to endless tools and skills,
rookies have a long list to get through. But a little word to the wise? Knowing how to work with
a command line interface (CLI) is a skill that can help deal with every other tool.

Skilled developers control their systems and run programs using a command line. CLI navigates
through a computer’s file system, runs programs, and gains remote access to other computers
using the best terminal emulator software.

So whether you’re in software development or cloud engineering, this application will make your
programming shine.

What is a command line interface?

A command line interface (CLI) is a computer program that runs on text-based inputs to
execute different tasks. Instead of pointing and clicking with a mouse, it receives single-line
commands that interact with system elements like file management.

Since you have to type to use CLI, you’ll perform tasks more quickly, sometimes with just a
single command. It can also automate tasks by building and executing scripts that run on a loop,
which saves a lot of time by eliminating human repetition.

2
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

Most operating systems have two types of interfaces: command line interface and graphical user
interface (GUI). While the latter is more common as the default interface in operating systems
like Windows, Linux, and macOS, a Unix-based system offers both CLI and GUI. Programming
languages like Python also support command line interfaces.

As the name suggests, users interact with graphical user interfaces by clicking on visual
elements like windows, icons, and menus to execute tasks. Command line interfaces, on the
other hand, take text commands as inputs to perform different tasks.

GUI is user-friendly and much simpler to understand, even for beginners. However, CLI
executes commands faster and consumes less memory, making it suitable for complicated
computing.

Following the launch of GUI in the 1980s, CLI lost its popularity as computer systems like
Windows and macOS acclimated to GUI. Yet, CLI remained relevant to IT sector professionals,
like software engineers and system administrators, who favored a more straightforward web user
interface for their systems.

Why is CLI important?

Regardless of which kind of development, programming, or IT tasks you deal with,


understanding the ins and outs of command line interfaces has immense value.

The command line interface might seem outdated with its text-only format, but this application
has a lot to explore. It’s powerful, fast, and tackles many tasks with a single command-line
instruction.

3
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

Once you get past the initial overbearing feeling of memorizing a never-ending list of
commands, you’ll realize the benefits of CLI's productivity. Think of it like a swiss army knife,
locked with powerful features behind simple commands.

By mastering CLI, you can acquire precise control, tremendous speed, and the ability to
automate tasks easily. Automation is achieved through shell scripting, which contains a sequence
of commands saved on a system, eliminating the need to code repeatedly. Plus, CLI windows
provides great flexibility across all operating systems.

How does command line interface work?

CLI program takes text-based commands from users and processes them, then displays the
output on the same screen. Users must be prompt in entering their single-line command input to
make the most of this application.

3 types of CLI commands:

 System commands are encoded as part of the operating system.

 Executable programs run text-based or graphical applications.

 Batch programs are text files that list a sequence of commands. They can include both
system commands and executable programs.

Examples of command line interface in different operating systems

The latest operating systems come with their default command line interface. Here are some of
the most popular operating systems and their respective CLIs:

macOS: Mac Terminal

Windows: Command Prompt

Linux: Linux Bash Shell

Google Cloud Platform: PowerShell, Cloud Shell

Amazon Web Services: AWS Command Prompt

Microsoft Azure: Azure CLI Bash

4
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

History of command line interface

The origins of the command line interface go back to the 1960s when developers used it
extensively to navigate around computer systems. Back then, computer systems only had
keyboards for input, and the screens could only display text as output.

One of the earliest examples includes the Microsoft Disk Operating System (MS-DOS) that used
CLI as the standard application. Typing a command was the best and only way to interact with
computers. However, one of the most significant drawbacks of CLIs was that you could risk data
loss if you entered commands incorrectly.

Things took a turn in 1964 when Douglas Engelbart invented the mouse and marked the
beginning of the point-and-click input method for computers. This invention drove people away
from CLI, and operating systems started developing other ways of computing that delivered
intuitive visual interactions, e.g., GUI.

While GUI has gained popularity over the years, most operating systems still offer both
interfaces to users. But where does the essence of CLI come from?

Introducing shell: The root of CLI

A shell functions as a command line interpreter by processing user commands and outputting the
result. Similar to a terminal emulator, a shell comes in all operating systems by default, but can
be installed and uninstalled. It also works as a programming language and builds scripts to
execute specific tasks.

Ultimately, the shell manages CLI and bridges the needs of the user with the capabilities of the
OS. Some popular examples include the command prompt for Windows and Born-Again Shell
(Bash) for macOS and Linux.

Shell vs. Bash vs. Terminal vs. Command Prompt

In the command line world, a few terms are used frequently and often interchangeably. However,
they differ in some ways, and you must understand them.

As mentioned above, a shell is a command line interpreter that executes commands. Bash is a
type of shell that is the default for Linux systems. The terminal is the CLI application on macOS,
whereas the command prompt, also known as Windows Command Processor (CMD), is used in
windows.

5
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

How do you open command line interface?

Think of the command line interface like Windows Explorer or Finder on Mac, but without the
graphical elements.

Depending on the version of CLI Windows or macOS you're running, there are usually two ways
to open the default command line interface. Linux is an open-source operating system with a
fairly simple method for accessing the default CLI.

perating
Method 1 Method 2
system
Hold the Windows key and press R to open
Go to the Start menu, and enter the text
Windows the “Run” window. Type “cmd” in the
"Command Prompt" in the search bar.
search bar and click “OK.”
Open spotlight (search icon on your menu
macOS bar), type “Terminal” in the spotlight search Go to Applications < Utilities < Terminal
bar, and hit the enter key.
Go to Applications < Accessories <
Linux Go to Applications < System < Terminal
Terminal

How do you use command line interface?

The command line interface is most commonly used for system administration tasks, such as:

 Installing and configuring software

 Monitoring computer resources

 Setting up and restarting web servers

 Automating repetitive processes

 Renaming files

 Managing system logs

 Debugging server issues

 Configuring databases

6
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

Common commands for CLI

A command line is a mixture of prompts and commands. The prompt is present at the start of
every command line and ends with a $ or %. A command is a thing that tells your system what
you want it to do.

This set of the most common commands for CLI in MS-DOS is helpful for novice coders.

Command Example Function

CD CD C:\Program Files Changes the current directory to a specified path

PWD /bin/pwd -P Prints the path of the current directory

REN REN d:untitled.txt untitled1.txt Renames a file

DEL DEL /F untitled.txt Deletes a file

LABEL D:\ > LABEL d:MyData Renames a volume disk

FORMAT C:\> FORMAT a: Formats a disk so it can be used with MS-DOS

DIR C:\> DIR Displays the contents of a specified directory

RMDIR C:\> rmdir c:\backup Removes a directory

MKDIR C:\> MKDIR c:\NewDIR Creates a new directory in a specified

Tip: Check out this A-Z index of commands for Apple macOS, Windows CMD, and Linux
CLI.

Command line interface benefits

As confusing as the command line interface might be for beginners, it also comes with a unique
set of benefits.

 Speedy execution: Once you familiarize yourself with the list of commands for CLI, you
can execute tasks much faster than usual. You’ll be able to perform complex actions
within a single line of code and process commands faster than when you use a GUI.

 Accessibility across all OSs: You don’t need to stick to one kind of OS to use CLI. It is
supported by all operating systems, including Windows, macOS, and Linux.

7
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

 Low memory: A CLI program doesn’t require a lot of memory to get things done. As a
result, it doesn’t slow down your system even when executing extensive tasks.

 Simple interface: The command line interface is text-only. Unlike GUI, which gets more
complicated with the number of features an application contains, CLI offers its users
simple interactions.

 Shell scripting: CLI supports shell scripting, which eliminates repetitive tasks by
automating them. It can execute multiple commands on your system daily by storing
them in a file and running the script.

Command line interface challenges

Despite the power and precision that CLI offers, users should be aware of a few issues before
beginning.

 It has a steep learning curve. Even for the most advanced users, CLI can be a bit
intimidating at first because it’s a text-only application. And each operating system has
its own commands; if you don’t work with them daily, they’re easy to forget.

 There’s no room for error. As fast as CLI is known to be, if you mistype any command,
you end up losing all your progress, transferring data to the wrong location, or deleting
the wrong file. This means you have to start from the beginning any time you make a
mistake.

 You can’t undo commands. Most CLI commands are irreversible, so you have to be
extra careful about running tasks because once you press enter, there’s no pausing or
undoing the command execution.

Command line interface best practices

Some people believe that CLI is a relic, but developers know it stays essential and relevant. More
recently, command line has become an excellent way for developers to interact with cloud
computing platforms and services.

You can get much more done in less time when using CLI the right way, and we’ve got some
tips for best practices on your CLI journey.

Provide an extensive help screen

CLI doesn’t come with a welcome screen or a navigation guide. But programmers can provide a
comprehensive help screen to guide users when they don’t know what they need. This help

8
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

screen acts like “getting started” documentation that users can reference for a quick overview
and to explain different commands.

Test different setups

When developing and testing your CLI, don’t expect uniformity across systems. When you get
CLI in front of different developers, you must be open to testing out multiple setups across
Windows, Linux, and macOS so you can receive valuable feedback and find any underlying
flaws.

Make use of command line history

CLI stores commands in its history file for you. It’s a great feature that allows users to recall and
reuse any command they’ve ever entered. As a result, complex or repetitive tasks can be
executed without having to retype them each time. Troubleshooting is also easier with this
option.

Check syntax before execution

Syntax governs how a command should be written and structured. So instead of wasting time
troubleshooting a malfunctioning command, check syntax first. If your syntax is faulty, the
command won’t run correctly. Some CLIs have built-in features for checking syntax and
reducing typos.

Envision. Code. Create.

As technologies continue to evolve, having access to powerful applications that leverage control
and precision remains relevant. While your average user probably doesn’t care about command-
based systems, power users know the value of CLIs. Whether you want to automate frequent
tasks, navigate through a server, access systems remotely, or access files more easily, CLI is
your answer.

Want to take your mechanization efforts to the next level? Learn about infrastructure as code
without wasting time on manual processes.

9
‫ مكي حسين عبد الرحيم‬.‫د‬.‫م‬ System Administration 1214/4/12

References

https://www.g2.com/articles/command-line-interface

https://www.techtarget.com/searchwindowsserver/definition/command-line-interface-CLI

https://builtin.com/software-engineering-perspectives/command-line-interface

10

You might also like