CS-150 – Introduction to Command Line Programming

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/48

flashcard set

Earn XP

Description and Tags

A set of vocabulary flashcards summarizing essential terms and definitions from the CS-150 lecture on Unix command-line programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

49 Terms

1
New cards

Unix

A modular family of operating systems that treat most resources as files, support shell scripting and pipes, and originated at AT&T Bell Labs.

2
New cards

Linux

An open-source re-implementation of Unix that runs on many platforms, including via WSL on Windows.

3
New cards

Kernel

The core of an operating system that manages hardware and system resources such as CPU and memory.

4
New cards

Shell

The outer layer of an OS that interprets user commands; can be a CLI or GUI, but the term usually refers to CLIs.

5
New cards

Command Line Interface (CLI)

A text-based interface where users type commands; prized for speed and remote access efficiency.

6
New cards

Graphical User Interface (GUI)

A visual interface using windows, icons and menus navigated with devices like a mouse.

7
New cards

sh (Bourne Shell)

The original Unix shell, created in 1974; small and simple with limited features.

8
New cards

bash (Bourne-Again Shell)

The default shell on most Linux distros; a superset of sh with many extra features and beginner-friendly design.

9
New cards

zsh

A feature-rich Unix shell similar to bash; default on recent macOS versions.

10
New cards

Command Prompt

Characters (e.g., $ for users, # for root) displayed by the shell indicating readiness to accept input.

11
New cards

Root User

The privileged Unix account with unrestricted system access, traditionally shown with a # prompt.

12
New cards

Command Syntax

$ command [arg1] … [argN] — the general format for entering shell commands.

13
New cards

Flag / Option

An argument (often starting with - or --) that modifies a command’s behaviour, e.g., -l or --help.

14
New cards

man

A command that displays a command’s manual (man page) in the terminal.

15
New cards

info

A command showing more detailed, hyperlinked documentation for programs such as bash.

16
New cards

--help

A common flag that makes a program print a brief description of its options.

17
New cards

Built-in Command

A command implemented inside the shell itself (e.g., cd, pwd) rather than as an external executable.

18
New cards

coreutils

A collection of standard external Unix commands such as ls, cp, rm and cat.

19
New cards

pwd

Built-in command that prints the current working directory’s absolute path.

20
New cards

cd

Built-in command that changes the current directory (.. for parent, no arg for home).

21
New cards

mkdir

Command that creates a new directory.

22
New cards

rmdir

Command that removes empty directories.

23
New cards

ls

Command that lists directory contents; common flags include -a, -l, -t, and -R.

24
New cards

touch

Command that updates a file’s timestamp or creates an empty file if it doesn’t exist.

25
New cards

cat

Command that concatenates files and writes them to standard output.

26
New cards

cp

Command that copies files or directories.

27
New cards

mv

Command that moves or renames files or directories.

28
New cards

rm

Command that removes (deletes) files; dangerous because deletions are permanent.

29
New cards

head

Command that prints the first 10 lines of a file (change with -n).

30
New cards

tail

Command that prints the last 10 lines of a file (change with -n).

31
New cards

less

Pager program to view files one screen at a time; space moves forward, / searches.

32
New cards

echo

Command that outputs its arguments; -e enables interpretation of backslash escapes.

33
New cards

Readline

Library providing command-line editing features like history navigation and tab completion.

34
New cards

File Descriptor

A non-negative integer that refers to an open file; 0=stdin, 1=stdout, 2=stderr by default.

35
New cards

Redirection

Technique of changing where a command reads input or sends output using >, >>, <, etc.

36
New cards

>

Redirect operator that sends stdout to a file, overwriting it.

37
New cards

>

Redirect operator that appends stdout to the end of a file.

38
New cards

2>

Redirect operator that sends stderr (descriptor 2) to a file.

39
New cards
<

Redirect operator that makes a command read input from a file instead of stdin.

40
New cards

Pipe (|)

Operator that passes the stdout of one command as stdin to another, enabling chaining of commands.

41
New cards

Globbing

Shell process of expanding wildcard patterns (*, ?, [], {}) to matching filenames.

42
New cards

Wildcard *

Pattern that matches any string of characters, including none.

43
New cards

Wildcard ?

Pattern that matches exactly one character.

44
New cards

chmod

Command that changes permission bits of a file using numeric (e.g., 774) or symbolic modes (+x).

45
New cards

chown

Command that changes the owner and/or group of a file.

46
New cards

Shebang (#!)

First line of a script specifying the interpreter path, e.g., #!/bin/bash.

47
New cards

Shell Script

A text file containing a series of shell commands to be executed together.

48
New cards

source

Built-in command that executes a script in the current shell environment.

49
New cards

nano

A simple terminal-based text editor often used to create or edit scripts.