Linux Fundamentals - Part 3

Information Technology49 CardsCreated 14 days ago

This deck covers essential concepts and commands in Linux as introduced in Part 3 of the TryHackMe series. It includes key Linux commands, file system navigation, and basic scripting.

What is the primary function of the Linux command line?

To interact with the operating system through text-based commands.
Tap or swipe ↕ to flip
Swipe ←→Navigate
1/49

Key Terms

Term
Definition
What is the primary function of the Linux command line?
To interact with the operating system through text-based commands.
What command is used to list files and directories in Linux?
The 'ls' command.
How do you change directories in Linux?
Use the 'cd' command followed by the directory name.
What command is used to display the current directory?
The 'pwd' command, which stands for 'print working directory'.
How can you view the contents of a file in Linux?
Use the 'cat' command followed by the file name.
What is the purpose of the 'mkdir' command?
To create a new directory.

Related Flashcard Decks

Study Tips

  • Press F to enter focus mode for distraction-free studying
  • Review cards regularly to improve retention
  • Try to recall the answer before flipping the card
  • Share this deck with friends to study together
TermDefinition
What is the primary function of the Linux command line?
To interact with the operating system through text-based commands.
What command is used to list files and directories in Linux?
The 'ls' command.
How do you change directories in Linux?
Use the 'cd' command followed by the directory name.
What command is used to display the current directory?
The 'pwd' command, which stands for 'print working directory'.
How can you view the contents of a file in Linux?
Use the 'cat' command followed by the file name.
What is the purpose of the 'mkdir' command?
To create a new directory.
How do you remove a file in Linux?
Use the 'rm' command followed by the file name.
What command is used to remove a directory in Linux?
The 'rmdir' command.
How can you copy files in Linux?
Use the 'cp' command followed by the source and destination.
What command is used to move or rename files in Linux?
The 'mv' command.
How do you display the first few lines of a file?
Use the 'head' command.
What command shows the last few lines of a file?
The 'tail' command.
How can you search for a specific text in files?
Use the 'grep' command.
What is the purpose of the 'chmod' command?
To change the permissions of a file or directory.
How do you change the owner of a file?
Use the 'chown' command.
What command is used to display running processes?
The 'ps' command.
How can you terminate a process in Linux?
Use the 'kill' command followed by the process ID.
What is the function of the 'top' command?
To display real-time system resource usage.
How do you find the path of a command in Linux?
Use the 'which' command.
What is the purpose of the 'man' command?
To display the manual pages for other commands.
How can you display disk usage in Linux?
Use the 'df' command.
What command shows the size of a directory and its contents?
The 'du' command.
How do you compress files in Linux?
Use the 'tar' command with appropriate options.
What is the 'sudo' command used for?
To execute commands with superuser privileges.
How do you update package lists in a Debian-based system?
Use the 'apt-get update' command.
What command installs new packages in Debian-based systems?
The 'apt-get install' command.
How can you remove packages in Debian-based systems?
Use the 'apt-get remove' command.
What is the purpose of the 'apt-get upgrade' command?
To upgrade all installed packages to the latest version.
How do you search for packages in Debian-based systems?
Use the 'apt-cache search' command.
What command is used to display network interfaces?
The 'ifconfig' command.
How can you view active network connections?
Use the 'netstat' command.
What is the purpose of the 'ping' command?
To test the reachability of a host on a network.
How do you download files from the internet in Linux?
Use the 'wget' command.
What command is used to change file timestamps?
The 'touch' command.
How do you create a symbolic link in Linux?
Use the 'ln -s' command.
What is the purpose of the 'echo' command?
To display a line of text or a variable value.
How can you schedule tasks in Linux?
Use the 'cron' jobs.
What command is used to view scheduled cron jobs?
The 'crontab -l' command.
How do you edit cron jobs in Linux?
Use the 'crontab -e' command.
What is a shell script?
A file containing a series of commands executed by the shell.
How do you make a script executable?
Use the 'chmod +x' command followed by the script name.
What is the shebang line in a script?
The first line that specifies the interpreter to use, e.g., '#!/bin/bash'.
How do you run a script in Linux?
Use './scriptname' if it's in the current directory.
What command is used to view the contents of a directory in a tree-like format?
The 'tree' command.
How can you find files by name in Linux?
Use the 'find' command with the '-name' option.
What is the purpose of the 'alias' command?
To create shortcuts for long commands.
How do you remove an alias in Linux?
Use the 'unalias' command followed by the alias name.
What command is used to display system information?
The 'uname' command.
How can you view the history of commands used?
Use the 'history' command.