pwd
Print Working DirectoryThe shell command pwd
displays the file path from the root directory to the current working directory.
$ pwd/Users/sonny/Downloads
mkdir
Make DirectoryThe shell command mkdir
is used to make a new directory in the filesystem according to its argument. If a file path is given, the new directory will be placed at the end. Otherwise, it will create a new directory in the current working directory.
$ mkdir new-directory$ lsold-directory new-directory
ls
ListThe shell command ls
is used to list the contents of a directory. If no arguments are given, it will list the contents of the current working directory.
$ ls Desktopresume.pdfphoto.png
cd
Change DirectoryThe shell command cd
is used to move throughout the filesystem of a computer. It accepts a variety of arguments:
..
the parent of the current directory.$ cd some-directory$ cd ..
A computer’s filesystem organizes the data stored by a computer, so that it can be easily retrieved by the user.
Files are generally represented in a tree-like structure, in which any parent directory can have any number of children. The root directory is then found at the base of the tree.
touch
Create New FileThe shell command touch
creates a new file in the current working directory with the name provided.
$ touch grocery-list.txt
The command line allows a user to navigate the filesystem and run built-in programs or custom scripts. In Unix, the command line interface is called Bash, and the shell prompt is the $
.
$
Helper commands for the command line include:
clear
to clear the terminalThe OSI Model is a conceptual, implementation-neutral model that describes networking in seven separate layers, where each layer covers a set of functions and tasks.
This model helps us communicate while we do network troubleshooting and architecture.
The TCP/IP Model is an implementation-specific networking model that revolves around the TCP protocol and IP addressing which anchor the Internet as we know it.
Its layers include:
The OSI layers include: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Three broad categories of networks include:
The Internet is technically a WAN.
A network is two or more computers or devices that are linked in order to share information.
Networking refers to a large set of standards and protocols that organize and regulate the sharing of information.
A network protocol is a set of standards for Internet traffic.
Among them are the big transport protocols:
cp
CopyThe shell command cp
is used to copy files or directories.
The basic argument structure is cp source destination
, where the source
is the file/directory to copy to the destination
file/directory.
$ cp file1 file1_copy$ cp file1 file2 destination_folder
Options can be used to modify the behavior of shell commands. Shell command options are commonly represented by a single letter preceded by a -
. For example, -l
, -a
, and -d
could all be options that follow a shell command.
mv
MoveThe shell command mv
is used to move a file into a directory. Use mv
with the source file as the first argument and the destination directory as the second argument.
$ mv index.html website/
rm
RemoveThe shell command rm
is used to delete files and directories. The -r
flag deletes a directory and all of its files and directories (rm -r
).
$ rm -r bad_selfies
ls
List Command OptionsThe shell command ls
is used to list the contents in a directory. It can be combined with the following command options:
-a
: lists all contents, including hidden files and directories.-l
: lists all contents, in long format.-t
: lists all contents, by the time they were last modified.$ ls -a$ ls -l$ ls -t
Linux is an open-source operating system that can be run on a wide range of devices. Linux can be operated without a graphical interface through a text terminal.
Linux is one of the most prominent success stories of open-source software and its development of Linux is supported by a number of open-source non-profit organizations like the Free Software Foundation and Open Source Initiative.
The Linux kernel is part of the operating system that controls all the major functions of the hardware which include process management, managing hardware devices, and task scheduling.
The Linux shell is a command-line interface between the user and kernel. Commands, typically using the Bash scripting language, are interpreted by the computer to perform a certain task.
A Linux distribution is an operating system that is based on the Linux kernel. Each distribution includes a different set of default software and tools.
Ubuntu is a beginner-friendly Linux distribution that offers a familiar desktop environment for users coming from more traditional operating systems. It provides a desktop environment and a suite of productivity tools to ease a transition to Linux.