Linux commands

Ace your homework & exams now with Quizwiz!

what command is used to display the contents of a file on linux?

cat

Which command-line tool is used on a Unix/Linux system to move upward on a directory in the system's directory structure?

cd ..

ehat command is used to show the status of a printer on linux?

lpstat

Which of the following commands is used on a Linux system to search for lines that match a pattern within a file?

grep

Which command-line tool is used on a Linux system to display a list of the files and directories within the current path?

Is

Which of the following remote access protocols should you use to connect to a Linux server securely over the internet?

SSH SSH (secure shell) is a remote administration and file copy program. It can also support virtual private networks using port forwarding. SSH operates over port 22. SSH works with Linux, Windows, and macOS. FTP and telnet are both insecure protocols. RDP is a Windows-based protocol.

Which of the following contains virtual memory that can supplement the physical system memory in a Linux system?

Swap partition

Which of the following commands is used on a Linux system to perform installations of new software packages?

apt-get

Which of the following file types are commonly used by scripts in a Linux command line environment?

.sh

Which of the following commands is used on a Linux system to change a file's permissions or directory on a system?

chmod The chmod command sets the permissions of files or directories on a Linux system. A set of flags associated with each file determines who can access that file and how they can access it. These flags are called file permissions or modes. The command name chmod stands for change mode. It restricts the way a file can be accessed.

Which command would be used to display the IP address and subnet mask for the wired network connection on a macOS or Linux system?

ifconfig

Which command would be used to display the IP address and subnet mask for the wireless network connection on a Linux system?

iwconfig

Which of the following commands is used on a Linux system to terminate an unresponsive system process?

kill

what command is used to make a new directory on linux?

mkdir

Which of the following commands is used on a Linux system to copy a file to a new directory and then remove the original file from the previous directory?

mv

Which command is used on a macOS or Linux system to change their password?

passwd

Which of the following commands is used on a Linux system to change a user's password on the system?

passwd

Which of the following commands is used on a Linux system to delete a file from a directory?

rm (The rm command is a command-line utility for removing files or directories. To remove a file, pass the name of a file or files to the rm command, and those files will be removed immediately from the file system.)

Which of the following Linux command-line options would shutdown a Linux server in 11 minutes from now?

shutdown +11

Which of the following commands is used on a Linux system to switch to another user's account?

su

what command is used to view the bottom lines on a linux prompt?

tail

what command is used to create a new file or change a timestamp on an exsisting file on linux?

touch

Which version should you use when installing a Linux operating system and are concerned with end-of-life support?

LTS release

Which file system type is used to mount remote storage devices on a Linux system?

NFS The Network File System (NFS) is used to mount remote storage devices into the local file system on a Linux system. It allows you to mount your local file systems over a network and remote hosts to interact with them while mounted locally on the same system.

You need to connect to a Linux server to conduct some maintenance. The server is located in a remote office about 50 miles from your own. You decide to connect the server remotely instead of driving to the location to save some time, but you want to ensure you do this securely. The Linux server has VNC installed, but it isn't configured to provide an encrypted connection. Which of the following should you use to secure the VNC connection to the remote server?

SSH in tunnel mode

Which command on a macOS or Linux system is used to change the permissions of a file?

chmod

Which of the following commands is used on a Linux system to change the ownership of a file or directory on a system?

chown

Which of the following commands is used on a Linux system to copy a file from one directory to another directory?

cp The cp command will copy your file(s) while the mv one will move them. The cp command is a command-line utility for copying files and directories. It supports moving one or more files or folders with options for taking backups and preserving attributes. Copies of files are independent of the original file, unlike the mv command.

Which of the following commands is used on a Linux system to perform an overwrite of an entire hard disk with zeros?

dd

Which of the following commands is used on a Linux system to convert and copy files from one hard disk to another?

dd The dd command is used to convert and copy files. On Unix and Unix-like operating systems like Linux, almost everything is treated as a file, even block devices like a hard disk drive. This makes dd useful to clone disks or wipe data. The dd utility is available out of the box even in the most minimal installation of all distributions.

what command is used to view the top lines of a file in linux?

head

What command would be used to list the current server on linux?

hostname

Which of the following commands is used on a Linux system to list the system's currently running processes?

ps

Which of the following commands is used on a Linux system to display the current working directory's full pathname to the screen?

pwd The pwd command is used to display the current working directory to the screen. The pwd command is the short name for "print working directory" on a Unix, Linux, or Mac operating system. If you are working on a Linux system and are unsure of where you are in the directory structure, type "pwd" and hit enter to display the path to the screen.

Which of the following commands is used on a Linux system to delete all the files and directories in a Linux system's filesystem?

rm -rf /The "rm -rf /" is the most dangerous commands to issue in Linux. The rm -rf command is one of the fastest ways to delete a folder and its contents. But a little typo or ignorance may result in unrecoverable system damage. The -r option means that the command will recursively delete the folder and its subfolders. The -f option means that even read-only files will be removed without asking the user. The use of / indicates that the remove command should begin at the root directory (/) and recursively force all files and folders to be deleted under the root. This would delete everything on the system. The . would only begin deleting from the current working directory and then delete all files and folders further down the directory structure, not the entire file system.

Which of the following commands is used on a Linux system to run a program with another user's permissions?

sudo (The sudo command allows programs to be executed as a superuser (known as the root user) or another user. It is basically the Linux/Mac equivalent of the runas command in Windows. The command's name is an abbreviation of the phrase "superuser do" and works on all Unix-based operating systems.)

Which of the following commands is used on a Linux system to edit a text file on a server?

vi


Related study sets

Study guide 6Today, the world is home to about how many people?

View Set

Bio 117 Exam 3(practice questions)

View Set

3 Chapter 20 Peripheral Vascular

View Set

PSY 337 Exam #3 -- Practice Review Questions

View Set