Lesson 6: Managing Linux and macOS Flashcards
System component providing a command interpreter by which the user can use a kernel interface and operate the OS.
shell
Command interpreter and scripting language for Unix-like systems.
bash
Software that implements input and output for a command shell.
terminal
tty
teletype
Device that implements input and output for a command shell. In Linux, multiple virtual consoles support use of a single host by multiple user sessions simultaneously.
console
Command-line text editor operated by CTRL key combinations.
Nano text editor
•
•
FHS
File system Hierarchy Standard
Linux command for showing the current directory
pwd
* (“Print Working Directory”)*
What is the cd command used to do?
change the working directory
What does the ls command do?
listing file system objects
ls lists the contents of a directory, in a similar way to dir at the Windows command prompt. Popular parameters include -l to display a detailed (long) list and -a to display all files including hidden or system files.
Linux command to view and combine (concatenate) files.
cat command
•
•
In Linux, there are overwrite and append redirection operators: What does this command do *cat»_space; file**?
Append the cat data to the destination file
Command-line Linux tool used to search the file system
find command
Linux command for searching and filtering input. This can be used as a file search tool when combined with ls
grep command
what does grep stand for
Globally search a Regular Expression and Print command is used to search and filter the contents of files. Its output prints (displays) the lines that contain a match for the search string.
Command-line tool for copying files in Linux
cp command
Copy file1.txt in the current working directory to a new file called file1.old in the same directory
cp file1.txt file1.old
Copy the file hosts from the directory /etc into the directory /tmp , keeping the file name the same:
cp /etc/hosts /tmp
Copy all files beginning with the name message from the /var/log directory into /home/david. The -v option displays the files copied:
cp -v /var/log/message* /home/david
Command-line tool for moving files in Linux
mv command
Move the file data.txt from the /home/david directory to the /tmp directory, keeping the file name the same:
mv /home/david/data.txt /tmp
Move and rename the file alarm.dat in the current directory to alarm.bak in /tmp:
mv alarm.dat /tmp/alarm.bak