Linux

Cheatsheet

Introduction to Linux Command Syntax Description Example List ls [OPTIONS] [FILE/DIRECTORY] List files and directories at path ls /home/user/documents Print Working Directory pwd Print present working directory pwd Change Directory cd [DIRECTORY] Change current directory cd /home/user/documents Super user do sudo [COMMAND] Run command with superuser privileges sudo apt update Text Editor nano [FILE] Open file with Nano text editor nano myfile.

2024-08-20

Text Files, Networking, and Archiving Commands

Text File Commands Viewing file content cat (catenate): Print entire file contents Limitation: If the file content is long, the output will take up the entire terminal window more: Print file content page-by-page

2024-08-17

Shell Scripting

Shell Scripting Basics A script is a list of commands that can be interpreted and run by a program called scripting language, which is usually not compiled but interpreted at runtime instead.

2024-08-15

Information, Navigation, and Management Commands

Overview What is a shell? User interface for running commands Interactive language Scripting language, can be used to automate tasks Default shell: Bash. Other shells: sh, ksh, tcsh, zsh, and fish.

2024-08-15

Introduction to Linux

Linux and Unix Operating System (OS) is software that manages computer hardware and resources allows interaction with hardware to perform useful tasks Unix A family of operating systems Popular Unix-based OS:

2024-08-15

chmod

Check permissions In terminal: ls –l [file_name] For example: $ ls -l -rw-r--r-- 1 EckoTan staff 12 Jan 5 18:02 hello-world.txt -rw-r--r-- : file permission EckoTan : owner/creator of the file staff : the group to which that owner belongs to Jan 5 18:02 : date of creation hello-world.

2021-01-05

tee

The tee command reads from the standard input and writes to both standard output and one or more files at the same time. tee is mostly used in combination with other commands through piping.

2020-12-18

Linux
Linux

Linux is a family of open-source Unix-like operating systems based on the Linux kernel.

2020-12-17

export

export command A built-in command of the Bash shell Ensure environment variables and functions to be passed to child processes Syntax export [-f] [-n] [name[=value] ...] or export -p -f : Names are exported as functions -n : Remove names from export list -p : List of all names that are exported in the current shell Usage Display all the exported environment variables of your system export Display all exported variable on current shell export -p If you want to check specified variable:

2020-12-17