tags:
- compsci/COMP1511/1
topic: General
date: 2023-12-16
Operating Systems
Operating systems act as the interaction between a computer and our own code, with the responsibility of executing said code as 'user programs'. Some examples of common operating systems (OSes) are Windows, Mac, and Linux.
As an open-source operating system, Linux has a significant quantity of distributions (distros) modified to work on a wide variety of devices, such as standard computers, Embedded Systems and supercomputers. Some examples of Linux distros are:
The terminal is a default application in Linux, acting as a graphical command-line interface to interact with the computer.
A shell is the program run within a terminal. Terminals receive user input, convey it to the shell, and return the shell's output.
A physical terminal is known as a console.
Command | Description | Notes |
---|---|---|
ls | Lists files in current directory | |
mkdir directoryName | Makes a new directory called directoryName | 'make directory' |
cd directoyName | Changes the working directory to directoryName | 'current directory' |
cd .. | Moves up one level of directories. | 'current directory' |
pwd | Outputs current directory location | 'print working directory' |
cp source destination | Copies a file from the source to the destination | |
mv source destination | Moves a file from the source to the destination | can be used to rename documents |
rm fileName | Delete a file | |
echo "" | Outputs | |
touch | Creates a new file named | |
cat | Outputs content of the file | meow :3 |
The argument -r
can also be used with either of the -cp
or -mv
commands to go through a directory and perform said command on all files within. For instance:
cp -r Documents Documents_backup