Shared Flashcard Set

Details

Linux Commands
Linux Commands
121
Computer Science
Professional
11/22/2022

Additional Computer Science Flashcards

 


 

Cards

Term

SSH

Definition

stands for Secure Shell and is also known as Secure Socket Shell. SSH is a secure network communication protocol. The protocol is primarily used by network administrators to connect to remote devices securely, Uses Port 22

Term
pwd
Definition

Use the command to find the path of your current working directory. Simply entering pwd will return the full current path – a path of all the directories that starts with a forward slash (/). For example, /home/username.

It has two acceptable options:

-L or –logical prints environment variable content, including symbolic links.

-P or –physical prints the actual path of the current directory.

Term
cd command
Definition

To navigate through the Linux files and directories, use the command. Depending on your current working directory, it requires either the full path or the directory name.

Running this command without an option will take you to the home folder. Keep in mind that only users with sudo privileges can execute it.

Let’s say you’re in /home/username/Documents and want to go to Photos, a subdirectory of Documents. To do so, enter the following command:

Photos.

If you want to switch to a completely new directory, for example, /home/username/Movies, you have to enter cd followed by the directory’s absolute path:

cd /home/username/Movies

Term
Ls command
Definition

The command lists files and directories within a system. Running it without a flag or parameter will show the current working directory’s content.

To see other directories’ content, type ls followed by the desired path. For example, to view files in the Documents folder, enter:

/home/username/Documents

Here are some options you can use with the ls command:

ls -R lists all the files in the subdirectories.

ls -a shows hidden files in addition to the visible ones.

ls -lh shows the file sizes in easily readable formats, such as MB, GB, and TB.

Term
cat command
Definition
This command has different applications like creating single/ multiple files, viewing the content of the file, concatenating files and redirect their output to the terminal or file. The cat command displays the file content on a screen. Cat command concatenates standard inputs to the standard output. When there is no FILE or when FILE is – then it read the standard input? It performs three main roles related to manipulation of text files: creating them, displaying them & combining them.
Term
cp command
Definition

Use the command to copy files or directories and their content. Take a look at the following use cases.

To one file from the current directory to another, enter cp followed by the file name and the destination directory. For example:

filename.txt /home/username/Documents

To copy files to a directory, enter the file names followed by the destination directory:

cp filename1.txt filename2.txt filename3.txt /home/username/Documents

To copy the content of a file to a new file in the same directory, enter cp followed by the source file and the destination file:

cp filename1.txt filename2.txt

To copy an entire directory, pass the -R flag before typing the source directory, followed by the destination directory:

cp -R /home/username/Documents /home/username/Documents_backup

Term

mv command

Definition

The primary use of the is to move and rename files and directories. Additionally, it doesn’t produce an output upon execution.

Simply followed by the filename and the destination directory. For example, you want to move filename.txt to the /home/username/Documents directory:

mv filename.txt /home/username/Documents.

You can also use the mv command to rename a file:

mv old_filename.txt new_filename.txt

Term

mkdir command

Definition

Use the command to create one or multiple directories at once and set permissions for each of them. The user executing this command must have the privilege to make a new folder in the parent directory, or they may receive a permission denied error.

Here’s the basic syntax:

For example, you want to create a directory called Music:

To make a new directory called Songs inside Music, use this command:

Music/Songs

The mkdir command accepts many options, such as:

-p or –parents create a directory between two existing folders. For example, mkdir -p Music/2020/Songs will make the new “2020” directory.


-m sets the file permissions. For instance, to create a directory with full read, write, and execute permissions for all users, enter mkdir -m777 directory_name.


-v prints a message for each created directory.

Term

rmdir command

Definition

To permanently delete an empty directory, use the Remember that the user running this command should have sudo privileges in the parent directory.

For example, you want to remove an empty subdirectory named personal1 and its main folder mydir:

rmdir -p mydir/personal1

Term

rm command

Definition

The command is used to delete files within a directory. Make sure that the user performing this command has write permissions.

Remember the directory’s location as this will remove the file(s) and you can’t undo it.

Here’s the general syntax:

filename

To remove multiple files, enter the following command:

rm filename1 filename2 filename3

Here are some acceptable options you can add:

  • -i prompts system confirmation before deleting a file.
  • -f allows the system to remove without a confirmation.
  • -r deletes files and directories recursively.
Term

touch command

Definition

The allows you to create an empty file or generate and modify a timestamp in the Linux command line.

For example, enter the following command to create an HTML file named Web in the Documents directory:

touch /home/username/Documents/Web.html

Term

locate command

Definition

The can find a file in the database system.

Moreover, adding the -i argument will turn off case sensitivity, so you can search for a file even if you don’t remember its exact name.

To look for content that contains two or more words, use an asterisk (*). For example:

locate -i school*not

The command will search for files that contain the words school and note, whether they use uppercase or lowercase letters.

Term

find command

Definition

Use the command to search for files within a specific directory and perform subsequent operations. Here’s the general syntax:

find [option] [path] [expression]

For example, you want to look for a file called notes.txt within the home directory and its subfolders:

find /home -name notes.txt

Here are other variations when using find:

  • find -name filename.txt to find files in the current directory.
  • find ./ -type d -name directoryname to look for directories.
Term

grep command

Definition

Global Regular Expression Print. A Linux / Unix command-line tool is used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files

Term

df command

Definition

The command is known as the “disk free” command gives the estimation of the total amount of disk memory space used by the input files and stored files in memory directories. It is used to measure and identify the memory usage of specific files and directories that take up a large sum of the disk memory usage. When we give a file name that is in the directory, the df will give the complete report of the memory usage of the disk in that directory. In this topic, we are going to learn about df Command in Linux.

Term

du command

Definition
command, short for disk usage, is used to estimate file space usage.
The command can be used to track the files and directories which are consuming excessive amount of space on hard disk drive.
Term

head command

Definition

The command allows you to view the first ten lines of a text. Adding an option lets you change the number of lines shown. The command is also used to output piped data to the CLI.

Here’s the general syntax:

[option] [file]

For instance, you want to view the first ten lines of note.txt, located in the current directory:

head note.txt

Below are some options you can add:

  • -n or –lines prints the first customized number of lines. For example, enter head -n 5 filename.txt to show the first five lines of filename.txt.
  • -c or –bytes prints the first customized number of bytes of each file.
  • -q or –quiet will not print headers specifying the file name.
Term

tail command

Definition

The command displays the last ten lines of a file. It allows users to check whether a file has new data or to read error messages.

Here’s the general format:

tail [option] [file]

For example, you want to show the last ten lines of the colors.txt file:

tail -n colors.txt

Term
diff command
Definition

the command compares two contents of a file line by line. After analyzing them, it will display the parts that do not match.

Programmers often use the command to alter a program instead of rewriting the entire source code.

Here’s the general format:

[option] file1 file2

For example, you want to compare two text files – note.txt and note_update.txt:

diff note.txt note_update.txt

Here are some acceptable options to add:

-c displays the difference between two files in a context form.

-u displays the output without redundant information.

-i makes the diff command case insensitive.

Term

tar command

Definition

The command archives multiple files into a  file – a common Linux format similar to ZIP, with optional compression.

Here’s the basic syntax:

tar [options] [archive_file] [file or directory to be archived]

For instance, you want to create a new TAR archive named newarchive.tar in the /home/user/Documents directory:

tar -cvf newarchive.tar /home/user/Documents

The tar command accepts many options, such as:

-x extracts a file.


-t lists the content of a file.


-u archives and adds to an existing archive file.


Check out the more practical examples to know more about the other functions.

Term

chmod command

Definition

is a common command that modifies a file or directory’s read, write, and execute permissions. In Linux, each file is associated with three user classes – owner, group member, and others.

Here’s the basic syntax:

[option] [permission] [file_name]

For example, the owner is currently the only one with full permissions to change note.txt. To allow group members and others to read, write, and execute the file, change it to the -rwxrwxrwx permission type, whose numeric value is 777:

chmod 777 note.txt

This command supports many options, including:

-c or –changes displays information when a change is made.


-f or –silent suppresses the error messages.


-v or –verbose displays a diagnostic for each processed file.

Term

chown command

Definition

The command lets you change the ownership of a file, directory, or symbolic link to a specified username.

Here’s the basic format:

[option] owner[:group] file(s)

For example, you want to make linuxuser2 the owner of filename.txt:

chown linuxuser2 filename.txt

Term

jobs command

Definition

A job is a process that the shell starts. The command will display all the running processes along with their statuses. Remember that this command is only available in csh, bash, tcsh, and ksh shells.

This is the basic syntax:

[options] jobID

To check the status of jobs in the current shell, simply enter jobs to the CLI.

Here are some options you can use:

  • -l lists process IDs along with their information.
  • -n lists jobs whose statuses have changed since the last notification.
  • -p lists process IDs only.
Term

kill command

Definition

When you execute any of the three kill commands against a process, what’s really happening is that it’s sending a TERM signal to the process. This is a “nice” way of asking the process to close. It tells the process to wrap up what it’s doing, and then close when it finishes. That means a process has time to close out connections, stop writing to log files, and shut down gracefully.

There are a lot of different signals you can send to a process, but the only other ones you’re likely to need are TERM, and HUP.

Term

ping command

Definition

The command is one of the most used basic Linux commands for checking whether a network or a server is reachable. In addition, it is used to troubleshoot various connectivity issues.

Here’s the general format:

ping [option] [hostname_or_IP_address]

For example, you want to know whether you can connect to Google and measure its response time:

ping google.com

Term

wget command

Definition

The Linux command line lets you download files from the internet using the command. It works in the background without hindering other running processes.

The command retrieves files using HTTP, HTTPS, and FTP protocols. It can perform recursive downloads, which transfer website parts by following directory structures and links, creating local versions of the web pages.

To use it, enter the following command:

[option] [url]

For example, enter the following command to download the latest version of WordPress:

wget https://wordpress.org/latest.zip

Term

uname command

Definition

The or unix name command will print detailed information about your Linux system and hardware. This includes the machine name, operating system, and kernel. To run this command, simply enter into your CLI.

Here’s the basic syntax:

[option]

These are the acceptable options to use:

  • -a prints all the system information.
  • -s prints the kernel name.
  • -n prints the system’s node hostname.
Term

top command

Definition

displays critical information about your systems, like CPU and RAM utilization, details about running processes, and more. You can press the shortcut keys to change how information is displayed on the dashboard. The command is one of the stalwarts of Unix-like operating systems. Its utilitarian display is packed with useful information about your system’s running processes and resource usage.

Term

history command

Definition

With , the system will list up to 500 previously executed commands, allowing you to reuse them without re-entering. Keep in mind that only users with sudo privileges can execute this command. How this utility runs also depends on which Linux shell you use.

To run it, enter the command below:

history [option]

This command supports many options, such as:

  • -c clears the complete history list.
  • -d offset deletes the history entry at the OFFSET position.
  • -a appends history lines.
Term

man command

Definition

The command provides a user manual of any commands or utilities you can run in Terminal, including the name, description, and options.

It consists of nine sections:

  • Executable programs or shell commands
  • System calls
  • Library calls
  • Games
  • Special files
  • File formats and conventions
  • System administration commands
  • Kernel routines
  • Miscellaneous

To display the complete manual, enter:

man [command_name]

For example, you want to access the manual for the ls command:

man ls

Enter this command if you want to specify the displayed section:

man [option] [section_number] [command_name]

For instance, you want to see section 2 of the ls command manual:

man 2 ls

Term

echo command

Definition

The command is a built-in utility that displays a line of text or string using the standard output. Here’s the basic syntax:

[option] [string]

For example, you can display the text Hostinger Tutorials by entering:

“Hostinger Tutorials”

This command supports many options, such as:

  • -n displays the output without the trailing newline.
  • -e enables the interpretation of the following backslash escapes:
  • \a plays sound alert.
  • \b removes spaces in between a text.
  • \c produces no further output.
  • -E displays the default option and disables the interpretation of backslash escapes.
Term

zip, unzip commands

Definition

Use the command to compress your files into a file, a universal format commonly used on Linux. It can automatically choose the best compression ratio.

The command is also useful for archiving files and directories and reducing disk usage.

To use it, enter the following syntax:

zip [options] zipfile file1 file2….

For example, you have a file named note.txt that you want to compress into archive.zip in the current directory:

zip archive.zip note.txt

On the other hand, the unzip command extracts the zipped files from an archive. Here’s the general format:

unzip [option] file_name.zip

So, to unzip a file called archive.zip in the current directory, enter:

unzip archive.zip

Term

hostname command

Definition

Run the command to know the system’s hostname. You can execute it with or without an option. Here’s the general syntax:

[option]

There are many optional flags to use, including:

  • -a or –alias displays the hostname’s alias.
  • -A or –all-fqdns displays the machine’s Fully Qualified Domain Name (FQDN).
  • -i or –ip-address displays the machine’s IP address.

For example, enter the following command to know your computer’s IP address:

hostname -i

Term

useradd, userdel commands

Definition

Linux is a multi-user system, meaning more than one person can use it simultaneously. is used to create a new account, while the command allows you to add a Only those with root privileges or sudo can run the command.

When you use the useradd command, it performs some major changes:

  • Edits the /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow files for the newly created accounts.
  • Creates and populates a home directory for the user.
  • Sets file permissions and ownerships to the home directory.

Here’s the basic syntax:

useradd [option] username

To set the password:

passwd the_password_combination

For example, to add a new person named John, enter the following command simultaneously:

useradd John

passwd 123456789

To delete a user account, use the userdel command:

userdel username

Term

apt-get command

Definition

is a command line tool for handling Advanced Package Tool (APT) libraries in Linux. It lets you retrieve information and bundles from authenticated sources to manage, update, remove, and install software and its dependencies.

Running the command requires you to use sudo or root privileges.

Here’s the main syntax:

apt-get [options] (command)

These are the most common commands you can add to apt-get:

  • update synchronizes the package files from their sources.
  • upgrade installs the latest version of all installed packages.
  • check updates the package cache and checks broken dependencies.
Term

nano, vi, jed commands

Definition

Linux allows users to edit and manage files a text editor, such as and come with the operating system, while has to be installed.

The denotes keywords and can work with most languages. To use it, enter the following command:

nano [filename]

vi uses two operating modes to work – insert and command. insert is used to edit and create a text file. On the other hand, the command performs operations, such as saving, opening, copying, and pasting a file.

To use vi on a file, enter:

vi [filename]

jed has a drop-down menu interface that allows users to perform actions without entering keyboard combinations or commands. Like vi, it has modes to load modules or plugins to write specific texts.

To open the program, simply enter jed to the command line.

Term

alias, unalias commands

Definition

allows you to create a shortcut with the same functionality as a command, file name, or text. When executed, it instructs the shell to replace one string with another.

To use the command, enter this syntax:

Name=String

For example, you want to make k the alias for the kill command:

k=’kill’

On the other hand, the unalias command deletes an existing alias.

Here’s what the general syntax looks like:

unalias [alias_name]

Term

su command

Definition

The switch user or command allows you to run a program as a different user. It changes the administrative account in the current log-in session. This command is especially beneficial for accessing the system through SSH or using the GUI display manager when the root user is unavailable.

Here’s the general syntax of the command:

su [options] [username [argument]]

When executed without any option or argument, the su command runs through root privileges. It will prompt you to authenticate and use the sudo privileges temporarily.

Here are some acceptable options to use:

  • -p or –preserve-environment keeps the same shell environment, consisting HOME, SHELL, USER, and LOGNAME.
  • -s or –shell lets you specify a different shell environment to run.
  • -l or –login runs a login script to switch to a different username. Executing it requires you to enter the user’s password.
Term

htop command

Definition

Linux utility for displaying crucial information about the system's processes. It can be considered as a Linux counterpart of Windows Task Manager. htop is more of an interactive program as it supports mouse and keyboard operations for switching between values and tabs.

Term

ps command

Definition

The command displays the information on the active processes in Linux. This command is useful when you want to manage any process, and prior information to that process is required.

The functionality of the command mainly relies on the number of options supported by it.

[image]

Term
clear
Definition
  • Enter the command to clean the Terminal screen.
Term
Tab
Definition
  • Press the button to autofill after entering a command with an argument.
Term
Ctrl + C
Definition
  • Use to terminate a running command.
Term
Ctrl + Z
Definition
  • Press to pause a working command.
Term
Ctrl + S
Definition
  • Use to freeze your Terminal temporarily.
Term
Ctrl + Q
Definition
  • Press to undo the Terminal freeze.
Term
Ctrl + A
Definition
  • Use to move to the beginning of the line.
Term
Ctrl + E
Definition
  • Press to bring you to the end of the line.
Term
ls -l
Definition
command is used to print long listing format of files available in the present working directory. l
Term
PWD
Definition

Print working directory

shows current directory you are in

Term
shred command
Definition
The basic function of the is to overwrite a file several times to destroy the data. To a file, use the following syntax: [filename] Replace [filename] with the exact name of the file.
Term
MkDir
Definition
The command in Linux/Unix allows users to create or make new directories. stands for "make directory." With you can also set permissions, create multiple directories (folders) at once, and much more.
Term
CP
Definition

Copy file

stands for copy. This command is used to copy files or group of files or directory. It creates an exact image of a file on a disk with different file name. command require at least two filenames in its arguments. Syntax:

Term
MV
Definition
is one of the must known commands in Linux. stands for move and is essentially used for moving files or directories from one location to another.
Term
RM
Definition
stands for remove here. command is used to remove objects such as files, directories,
Term
RMDIR
Definition
Using command in Linux The has a simple syntax: [option] directory Let's see its usage. Delete an empty directory
Term
RM-R
Definition
option, you can delete a directory having sub directories inside it.
Term
useradd
Definition
is a command in Linux that is used to add user accounts to your system. It is just a symbolic link to command in Linux and the difference between both of them is that is a native binary compiled with system whereas adduser is a Perl script which uses binary in the background. It make changes to the following files:
Term
SU
Definition
to make the shell a login shell The -, -l, or --login options make the shell a login shell with an interface similar to a normal login user. It is used to switch the logged-in user in the terminal. $ - user OR $ -l user OR Advertisement $ --login user Sample Output: It also sets the default home directory of a user deepak. 2.
Term
whoami
Definition
command is used both in Unix Operating System and as well as in Windows Operating System. It is basically the concatenation of the strings .; It displays the username of the current user when this command is invoked.
Term
Passwd
Definition
command in Linux is used to change the user account passwords.
Term
Sudo apt update
Definition
updtes the repository
Term
sudo apt finger
Definition
used to install finger
Term
finger
Definition
used to inspect other users
Term
whatis
Definition
The command is used to get brief information about Linux commands or functions. It displays the manual page description in a single line of the command that passes with the command. It searches for the strings that have been passed with it from its index databases. Its index database is maintained by the mandb program.
Term
wget
Definition
is a command-line utility for downloading files from the web. With you can download files using HTTP, HTTPS, and FTP protocols
Term
Curl
Definition

Command Options accepts a wide array of options, which makes it an extremely versatile command. Options start with one or two dashes

The most basic use of is typing the command followed by the URL. https://www.geeksforgeeks.org This should display the content of the URL on the terminal. The URL syntax is protocol dependent and multiple URLs can be written as sets like: http://site. {one, two, three}.com URLs with numeric sequence series can be written as:

Term
less
Definition
The command lets you page through a text file, displaying a screenful of text each time. It seems like one of the simplest Linux commands at first glance, but there's a lot more to than meets the eye. The History of Everything in Linux-and Unix—has a history, no pun intended.
Term
Head
Definition
he Linux command prints the first lines of one or more files (or piped data) to standard output. By default, it shows the first 10 lines.
Term
Tail
Definition
he Linux command is an essential tool for the command line. The command is primarily used to output theend of a (text) file or to limit the output of a Linux command. The Linux tail command is thus in line with the Linux head command and "cat" and "less" commands. These Linux commands are used to output the contents of text files.
Term
cmp
Definition
command in Linux/UNIX is used to compare the two files byte by byte and helps you to find out whether the two files are identical or not. When is used for comparison between two files, it reports the location of the first mismatch to the screen if difference is found and if no difference is found i.e the files compared are identical.
Term
chmod +x
Definition
takes three main arguments: r, w, and x, which stand for read, write, and execute, respectively. Adding or removing combinations of the arguments controls file and folder permissions. For example, +rwx adds permission to read, write, and execute scripts. Running -wx removes the ability to write and execute.
Term

ifconfig

Definition

. command without any argument displays the details of all the active interfaces. This command also displays the assigned ip address of active interfaces. There could be interfaces that are active but they may not have been assigend an IP address.

Term
sudo apt install nettools
Definition
installs nettools ifconfig
Term

ipaddress

Definition

When the - i is used with the hostname command it will display this output. It can also be used to display the of the host: hostname -I It will simply display the of the host in the terminal.

Term
ipaddress | grep etho0
Definition
Grep is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files. Using the grep Command
Term
Netstat
Definition
shows what ports are open on the server
Term
netstat -tulpn
Definition
Type and press Enter. This will show you a list of all the open ports on your system, as well as the PID and name of the program that is using each port. If you want to see more information about a specific port, type ________ | grep portnumber and press Enter.
Term

netstat - tulpn | grep LISTEN

Definition

Handy command to check listening and ports and application on Linux : $ netstat - tulpn | grep LISTEN All the netstat options in the command are explained in the next sections. 3. List all UDP ports To list all the UDP port connections, use the following syntax. $ netstat -au 4. List Listening Ports

Term
ss command
Definition

A tool that is used for displaying network socket-related information on a Linux system. The tool displays more detailed information than the netstat command which is used for displaying active socket connections.

The basic command without any options simply lists all the connections regardless of the state they are in.

You can retrieve a list of both listening and non-listening ports using the -a option as shown below.

To display listening sockets only, use the -l flag as shown.

Term
iptables
Definition

a command line interface used to set up and maintain tables for the Netfilter firewall for IPv4, included in the Linux kernel. The firewall matches packets with rules defined in these tables and then takes the specified action on a possible match. Tables is the name for a set of chains. Chain is a collection of rules.

In the Linux operating system, this is a utility or tool to manage the firewall rules in the environment. Similarly, we have one more tool to manage the firewall rules on the Linux, i.e., firewalld. These are used to manage setup and examine the IP packets in the Linux kernel. It will help to restrict unwanted packets in the environment.

Term
ufw Command
Definition
Below are a few examples of the ufw command. ufw Command Examples 1. Enable ufw: # ufw enable 2. Disable ufw: # ufw disable 3. Show ufw rules, along with their numbers: # ufw status numbered 4. Allow incoming traffic on port 5432 on this host with a comment identifying the service: # ufw allow 5432 comment "Service" 5.
Term
free
Definition
amount memory available
Term
df -h
Definition

The command known as the “disk free” command gives the estimation of the total amount of disk memory space used by the input files and stored files in memory directories. Use this command option to view it as a HUMAN easy read.

It is used to measure and identify the memory usage of specific files and directories that take up a large sum of the disk memory usage. When we give a file name that is in the directory, the df will give the complete report of the memory usage of the disk in that directory. In this topic, we are going to learn about df Command in Linux.

Term
TOP
Definition
Run "" in the Linux terminal to launch this utility. displays critical information about your systems, like CPU and RAM utilization, details about running processes, and more. You can press shortcut keys to change how information is displayed on the dashboard. The Linux command is one of the stalwarts of Unix-like operating systems.
Term

ps aux | Grep thiscommand

Definition

shows process command

command accepts a vast number of options that can be used to display a specific group of processes and different information about the process, but only a handful are needed in day-to-day usage. is most frequently used with the following combination of options

Term
ps-aux
Definition

he command displays the information on the active processes in Linux. This command is useful when you want to manage any process, and prior information to that process is required. The syntax of the command is provided below: $<OPTIONS>. The functionality of the " " command mainly relies on the number of options supported by it.

The aux command in Linux is a command line utility that displays all running processes. The output of this command is a list of all running processes, including the process ID, the user who started the process, the command that started the process, and the amount of CPU time the process has used.The ps aux command is useful for troubleshooting and for monitoring process activity.

Term
kill -9 process id
Definition

The command is used to send a signal to the service to shut down immediately. Typically, this command is used when a program is not responding and requires immediate shutdown. It will automatically shut down if the kill command is used; however, an unresponsive program will not obey a kill command.

If you encounter a stubborn process that refuses to close, you can send this command instead of a signal instead, which will close the process immediately. Add the (its corresponding number in the list above) option to your command to send a KILL signal to a process.

Term

pkill -f (filename/command name )

Definition

The Command is used to kill a command by the command's name. You may be used to killing a process with the kill command. However, we can use the command to do the same task. The only difference is that the command works only with the command names rather than the process IDs

Term

systemctl start

systemctl stop

Definition

Starts a process

You can use the command to manage services and control when they start. Restart a service After editing the /etc/ssh/sshd_config file, use the restart command to make the service pick up the new settings: $ sudo restart sshd You can verify the service is running by using the status subcommand:

Term
Global system messages are logged here. (default logging area on some systems)
Definition
/var/log/messages
Term
Global System messages are logged here. (default logging area on some systems)
Definition
/var/log/syslog
Term
System Authorisation information, including user login information
Definition
/var/log/auth.log
Term
Kernel messages are logged here
Definition
/var/log/kern.log
Term
Contains logging information from your mail server
Definition
/var/log/mail.log
Term
System boot messages are logged here
Definition
var/log/boot.log
Term
Contains information from package updates that use APT
Definition
/var/log/apt
Term
Contains information relating to users logged onto your system
Definition
/var/log/wtmp
Term
Printer related messages logged here
Definition
/var/log/cups.log
Term

Dmesg

Definition

command let's look at the kernel buffer you peer into the hidden world of the Linux startup processes. Review and monitor hardware device and driver.

Term

Vmstat

Definition

command (short for virtual memory statistics) is a built-in monitoring utility in Linux. The command is used to obtain information about memory, system processes, paging, interrupts, block I/O, disk, and CPU scheduling. Users can observe system activity virtually in real-time by specifying a sampling period

Term

Pidstat

Definition

command is used for monitoring individual tasks currently being managed by the Linux kernel. It writes to standard output activities for every task selected with option -p or for every task managed by the Linux kernel if option -p ALL has been used.

Term

MTR

Definition

a networking tool that combines ping and traceroute to diagnose a network

Term

Mpstat

Definition

is a command that is used to report processor related statistics. It accurately displays the statistics of the CPU usage of the system. It displays information about CPU utilization and performance. It initializes the first processor with CPU 0, the second one with CPU 1, and so on.

Term

IOstat

Definition

command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates.

Term

Free

Definition

command outputs a summary of RAM usage, including total, used, free, shared, and available memory and swap space. The command helps monitor resource usage and allows an admin to determine if there's enough room for running new programs. In this tutorial, you will learn to use the free command in Linux.Dec 29, 2021

Term

Ifconfig

Definition

command to assign an address to a network interface and to configure or display the current network interface configuration information

Term

Sar

Definition

command, or System Activity Reporter, is part of the sysstat package. It captures a set of statistical information such as CPU load, memory paging, memory utilization, swap usage, network I/O, and much more.

Term

Ss

Definition

 used to dump socket statistics. It allows showing information similar to netstat. It can display more TCP and state information than other tools.

Term
IfTop
Definition
Yet another monitoring tool that monitors network bandwidth in real-time. It captures total inbound and outbound data packets flowing through a network interface and displays the total bandwidth usage.
Term
Smem
Definition

a command-line memory reporting tool that gives a user diverse reports on memory usage on a Linux system. There is one unique thing about this command, unlike other traditional memory reporting tools, it reports PSS

(Proportional Set Size ), a more meaningful representation of memory usage by applications and libraries in a virtual memory setup.

Term

Dig @ server or Dig Google. Com

Definition

command stands for Domain Information Groper. It is used for retrieving information about DNS name servers. It is basically used by network administrators. It is used for verifying and troubleshooting DNS problems and to perform DNS lookups

Term

Mkdir

Definition

Creates a directory

Term

SSH

Definition

Secure shell connection using port 22

Term

Method 1: Use 'sudo -i' to become root user or superuser in Linux.

Method 2: Use 'sudo -s' to become root user or superuser in Linux.

Method 3: Use 'sudo su -' to become root user or superuser in Linux.

Method 4: Use 'su - root' to become root user or superuser in Linux.

Definition

Ways to Become root user or Superuser in Linux

Term

How to get to the Grub menu

Definition

Hold down shift key while system boots up

Term

Where are the kernel models located?

Definition

Etc/modules use nano to open it. Nano/etc/modules

Term

SS -l

Definition

To display listening sockets only, use the -l flag as shown.

Term

SS -a

displaying active socket connections.

Definition

Display active socket connections
Listing Listening and Non-listening Ports You can retrieve a list of both listening and non-listening ports using the?

Term
What is INITRD
Definition
When you boot your computer and the bios starts to load the disk, it has to uncompress the kernel from disk and start to load drivers. Problem was, what if you needed drivers to access the disk? How would one read what is on disk, if you couldn't access the disk without the drivers. A good example is RAID. In certain raid setups, data is striped across multiple disks. Part of the data on one, part on the other. If you don't have the driver to tell the system how raid works, then it will try to access the disk like normal. When it does, it finds the disk is missing half of the striped data. So now with an initrd, we carve out a chunk of ram and make it into a filesystem, and INITRD puts what drivers we need to access the disks there. Using that info we can now access the drives and load the kernel. Phew. I hope I didn't cause more damage than good.
Term

HUP

or

$ kill -HUP 1234

Definition

The other handy kill signal is , which instructs a daemon to reload its configuration. This can be useful when you’ve updated a service’s configuration files but need to reload the process for the new changes to take effect. Send the signal by using the following command syntax.

Supporting users have an ad free experience!