reading note 5 - carlosjorr/reading-notes GitHub Wiki

Reading notes 5

1.Explain the terms “shell”, “terminal”, “cli”, and “command prompt”.

*shell: a shell is a command line interpreter that executes commands.

*terminal: is a text input and output environment. A terminal window, also known as a terminal emulator, is a text-only window that emulates a console in a graphical user interface (GUI)

*cli: is an interface where the user types a command (which is expressed as a sequence of characters — typically a command name followed by some parameters) and presses the Return key to execute that command.

*command prompt:a command line interpreter application available in most Windows operating systems. It's used to execute entered commands. Most of those commands automate tasks via scripts and batch files, perform advanced administrative functions, and troubleshoot or solve certain kinds of Windows issues

Why are these still used today, when we have graphical interfaces?

is often the quickest, most powerful way to express complex operations. What would take perhaps dozens of mouse clicks, paging through multiple screens, and selecting numerous options, can be expressed in a single line of easy-to-read text. Once that line of code does what you want, you can save it to a script and run it again and again, too.

2.What are the commands to change directories, list the file’s contents and rename/move files?

commands to change directories; The current working directory is the directory or folder where you are currently working. You can use the cd (change directory) command to change the current working directory or move around the file system. This command will work in all Linux distribution.

list the file’s contents; The ls command is used to list files or directories in Linux and other Unix-based operating systems. Just like you navigate in your File explorer or Finder with a GUI, the ls command allows you to list all files or directories in the current directory by default, and further interact with them via the command line.

rename/move files; Use the move (mv) command on Linux to rename files and folders. The system understands renaming files as moving the file or folder from one name to another, hence why the mv command can be used for renaming

What are relative and absolute paths? A relative path describes the location of a file relative to the current (working) directory*. An absolute path describes the location from the root directory. When learning to access data files through programming, we regularly use relative file paths.

What is special about starting with a ~ (tilde) or a ‘/’ character in the path? The tilde () is a Linux "shortcut" to denote a user's home directory. Thus tilde slash (/) is the beginning of a path to a file or directory below the user's home directory.

Explain what Linux is, using anything except English.