Linux Commands for TestOut LabSims Ch. 1-2+ Tests

STUDY
PLAY

Terms in this set (...)

pwd
Display the path of the current directory (Present Working Directory) on the system
ifconfig
Display the IP address and subnet mask assigned to a system.
ls
Basic syntax to display a list of file and subdirectories that exist within a directory.
ls -a
Displays a list of file and subdirectories that exist within a directory, including hidden files.
ls -l
Displays a detailed list of directory contents including ownership, permissions, modification dates, and file sizes.
ls -R
Displays the content of the directory as well as the content of all its subdirectories.
(command) --help
Displays a brief summary of how to use the command. Replace "(command)" with the command you want to query.
bash
Stars a new Bourne-again session.
(command) man
Displays the manual page for a command. Replace "(command)" with the command you want to query.
(command) info
Displays in depth detail and instructions for a command. Replace "(command)" with the command you want to query.
cd (cd /home/currentlocation /home/newlocation)
Changes the directory in a file system that you are working in
cp (cp file.txt /home/newlocation)
Copies a file to a different directory.
mv (mv oldname.txt newname.txt)
Renames a file or directory by moving it to the same location with a different name.
mv (mv file.txt /home/newlocation)
Moves a file or directory to a new directory.
rm (rm file.txt)
Removes/deletes a file from the computer.
cat (cat file.txt)
Displays the content of a file.
less (less file.txt)
Displays the content of a file one page at a time.
head (head file.txt)
Displays the first few lines of a file.
tail (tail file.txt)
Displays the last few lines of a file.
vi (vi file.txt)
Opens the file editor for a file.
i
Allows you to insert text into a file once you are inside the file editor.
Esc
Once inside the file editor this command takes you to the command line to save the file.
:wq
Saves and exits out of a file editor.
:exit
Exits the file editor.
su -
Switches to the root user and home directory.
shutdown (shutdown -h | -r +m message)
Shuts down the computer. -h is shutdown, -r if rebooting after shutdown, +m is minute delay before shutdown, message is displayed message on screen before shutting down.