By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Common Features and Tools of the Linux Client/Desktop OS 220-1102: Objective 1.11: Identify common features and tools of the Linux client/desktop OS.
Linux operating systems are far less common than Windows on organizational desktops; however, they have an ever-growing presence as the OS on servers and other enterprise-level computers.
Common Linux Commands With more Linux systems showing up on corporate networks, computer technicians need to understand basic Linux commands. The following sections review the commands that can appear on the A+ exam. To use these commands, open a Terminal session. Some commands must be run as root user. (To run commands as root, log in as root or use sudo.) ls ls is the macOS and Linux equivalent to the Windows command dir. Use ls -l to list the contents of a directory (folder), including permissions and other information (see Figure). Using ls -l in Fedora 23 Workstation
grep Use grep to perform text searches. The grep command line specifies what to search for and where to search. grep can be used to find a specified word in one or more specified files. grep normally searches for exact matches (Linux and macOS are case sensitive), but it can be configured to ignore case with -i. grep supports recursive searching—that is, searching in all files in directories (folders) beneath the current directory.
Figure shows grep being used to search for the word model in the /proc/cpuinfo directory (folder). Searching for Specific Text in a Folder by Using grep
cd Use cd to change directories (folders). The syntax is different from the Windows command line: Linux uses the / slash, whereas Windows uses the \ slash. Use cd /etc to change to the /etc folder. Use cd.. to move up one level.
shutdown Use shutdown to shut down the system. Figure below shows shutdown used along with options to specify when to shut down and when to broadcast a warning message. Note that the sudo command is used with this command because shutdown requires root access. Preparing to Shut Down a System
pwd pwd displays the name of the current/working directory.
mv Use mv to move files to a specified location, as in this example: mv thisfile.ext destination-folder
cp Use cp to copy files to a specified location (using the syntax cp filename /folder/ subfolder) or to a different name in the same folder (for example, cp -i origfile copiedfile). Use the -i option to be prompted in case the command would overwrite a file.
rm Use rm to remove (delete) files from the system (rm filename).
chmod Use chmod to change permissions of files and directories using the syntax chmod permissions filename. In Figure 6-64, chmod is used to change permissions on the file test. The numbers that are used stand for different permissions. To learn more about these values, see the Chmod Calculator at https://chmod-calculator.com. Also note that, in Figure below, the command ls -l is used to display file permissions and the filename. Changing Permissions for the File Test Using Ubuntu
chown Use chown to change file ownership using the syntax sudo chown newowner filename.
su/sudo Use sudo to run a command as another user. It is most commonly used by a user to run a command as root. Use su to switch between accounts. Entering su without specifying options changes to root and prompts for the root password.
apt-get Use apt-get to install or manage Advanced Packaging Tool (APT) software packages, which are common in Debian-based distributions such as Ubuntu (see Figure). The apt-get command must be used with sudo. Use this syntax: sudo apt-get function appname. Installing torcs (The Open Racing Car Simulator) with apt-get on Ubuntu
YUM (Yellowdog Updater, Modified) YUM is an open-source utility that provides for automatic updates and package management in Linux.
ip The ip command is used to manage network interfaces. It can bring up the network interfaces or shut them down, manage IP addresses, and look at routing and ARP tables.
df (Disk Free) The df command is used to display used and free space on disks. The command also has options for viewing file system size.
ps Use the ps command to list the processes and tasks running in the OS (see Figure). Listing Processes for the Current User with ps
man Linux distributions (distros) contain a manual (manpages) with options for each command. To view or print a command’s manpage, use the command man. To learn more, see www.linfo.org/man.xhtml. To view manpages for Ubuntu (one of the most popular distros) online, see https://manpages.ubuntu.com.
top The top command provides summary information on resource use for tasks and processes in the form of a dashboard. It can also be used to monitor CPU and memory usage.
find The find command is used to find files and directories and information about them. You can search by name, date, owners, and so on.
DIG (Domain Information Groper) The dig command provides useful information on DNS servers for troubleshooting DNS issues.
cat cat is a utility command for writing text into files and printing file content.
nano nano is a command-line text editor with keyboard shortcuts and functions for editing files.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.