LINUX Flashcards

1
Q

The ‘ls’ command

A

“list files as specified”
Lists files in a directory, often used to navigate the file system.

Syntax: ls [option] [file/directory]

Common options:
-d → ‘directories only’, List directories themselves, rather than their contents.
-l → ‘long format’, provides more detail
-a → ‘show all’ (including hidden files)
-t → ‘time sorted’, Displays the most recently modified files first
-r → ‘reversed order’, Displays files first in reverse order from default order
-S → ‘Size order’, Displays files largest to smallest
-R → ‘recursive display’, List files and directories recursively (including subdirectories)
-i → ‘inode’, Displays the index number of each file/directory
-g → ‘group’, displays the group ownership of files and directories instead of the owner
-h → ‘human readable’, Print file sizes in human-readable format (e.g., 1K, 234M, 2G).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Lists files in a directory, often used to navigate the file system.

A

Syntax: ls [option] [file/directory]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Change the current directory

A

Syntax: cd [directory]

Tips:
1) “cd /” takes you back to the root
2) “cd ~” takes you back to the home
3) “cd .. “ takes you one level ‘up’ from the current working directory
If you’re already in the parent directory of the target, you do not need to include the full path name in the [directory] input -just enter the path from your working directory to your target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Display currently running processes

A

Use the ‘ps’ command.
This is useful for monitoring system activity.

Output is in four columns:

PID – the unique process ID 
TTY – terminal type that the user is logged into 
TIME – amount of CPU in minutes and seconds that the process has been running 
CMD – name of the command that launched the process. 

Syntax: ps [options]

Available options:
a → List all ruining processes for all users
-A, -e → Lists all processes on the entire system, complete overview of running tasks and programs.
-a → List all processes except session leaders (instances where the process ID is the same as the session ID) and processes not associated with a terminal.
-d → Lists all processes except session leaders, providing a filtered view of processes running on the system.
–deselect, -N → Lists all processes except those that meet specific user-defined conditions.
f → Displays the hierarchy of processes in a visual ASCII art format, illustrating parent-child relationships.
-j → Presents the output in the jobs format, providing detailed information such as process ID, session ID, and command.
T → Lists all processes associated with the current terminal, aiding in focusing on tasks related to a specific terminal.
r → Only lists running processes, useful for monitoring system performance.
u → Expands the output to include additional information like CPU and memory usage.
-u → Specifies a username, listing processes associated with that user.
x → Specifies a username, listing processes associated with that user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Motivation, Basis, & Influences (Linux)

A

Invented in 1991 by Linus Torvalds

Linus wanted to create an alternative to MINIX 

    MINIX was an expensive proprietary OS 

Linus' goals: 

    Open source 

    Extensible/Modifiable 

    Community Driven
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Early development (Linux)

A

Linus posted about it on the MINIX server, explaining that it was “just a hobby” (no one knew how big/popular it was going to end up being)

Originally called Freax (pronounced "Freaks") 

    Renamed after one of Linus' friends uploaded code to their FTP server in a file called "Linux" 

What Linus actually built was pretty basic (built on a simple Kernel) 

    Linus collaborated with Richard Stallman on the GNU project to fill in a lot of the gaps 

    Because people kept adding to it, the use cases just kept adding up
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Linux’s role in historically significant projects

A

A critical part of FAANG (specifically Google, Amazon, and Facebook)

    Plus it's the foundation of Android 

Played a role in the development of the internet and cloud computing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Linux Strengths

A

Stable

Good Security 

High Performance 

Versatile (from a hardware perspective)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Linux weaknesses

A

Unintuitive: Steep learning curve

Limited compatibility with proprietary software and drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Linux Value/Application

A

The “preferred” Platform of developers (since it is so flexible and has an insane number of libraries)

    It's used in pretty much everything
How well did you know this?
1
Not at all
2
3
4
5
Perfectly