How to Use SCP Command to Securely Transfer Files
The SCP command uses the SSH protocol for authentication and connection. After establishing a connection, the source file/directory to the destination/target.
The SCP command uses the SSH protocol for authentication and connection. After establishing a connection, the source file/directory to the destination/target.
The special characters “^” and “$” in combination can be used to retrieve words or sentences starting and at the same time ending with a specified character.
In Linux, the “nc -l” command creates a simple network server by specifying the
To match the exact string using the “grep” command, use the “grep -w “matching_string”
In Linux, multiple edits with a single call to the sed command are performed on a string or a file by repeating the multiple sed patterns (single call to sed).
In Linux, the “arping” command sends ARP requests to the host by specifying the IP address and verifying the availability of hosts on a network.
To find duplicate files in the quickest way, use the “fdupes” command with the “r” option by specifying the directory name.
The “lftp” command transfers or manages files in a remote machine by making a connection over protocols including UDP, HTTP, FTP, and many more.
To follow the redirect to the URL, execute the “curl -L
To output the binary representation of a hex number, execute the “echo -n “
To instant search with the “less” command, use the “less
To capture all the UDP packets using the tcpdump command, execute the “sudo tcpdump -i
The “ps -ef | grep processname” command filters out a process from a list of running processes and displays information in the Linux system.
To install the “tar.gz” files using sudo, extract the files, configure the binaries, then compile them, and lastly install the executable using sudo in Linux.
To run the getent command in Linux, follow the general syntax “getent [Options] [Database] [Key]”. It finds the information from the computer’s databases.
The passwd command is used by following the general syntax of the “passwd [Options] [User name]” to set and change the password of user accounts.
Linux offers the “echo “Body” | mailx -a attachment.pdf -s “Subject” [email protected]” command to send and receive email messages.
Linux offers the “sudo gpasswd -d
Linux offers the “nice” commands to run a program with a modified scheduling priority and “renice” for an already-running process.
The nmap command scans the IP addresses on Linux to get their information. We can scan the range of IP addresses with the nmap.
The crontab offers the “MAILTO” parameter to set the mail address to send notifications. Once the job is executed, an email will be sent to the address.
Linux offers the “tar” command with the “tvf” option to view the contents of a tar file. It displays the “file names”, “date and time”, and “file location”.
Linux offers the “lsusb” command to display a list of all USB devices connected to the system, including the device’s vendor ID, product ID, and device class.
Linux offers the “curl” command to make REST API requests to the server. Different HTTP methods, GET, POST, PUT and DELETE, are used to manage data.
Linux offers the “nmap” command to scan the subnet by displaying the connected devices over the IP addresses in the same network.
The docker “run” command starts a new container from a docker image. The users can set up the new container, the password, and the volume of the container.
To use the script command in Linux, we can run the “script” command. This command is used to record the activity of the shell.
To add the entries in the syslog file, use the logger command in Linux by following the command syntax “logger [options] [log]”.
From the command line, you can use the “kill” and “pkill” commands to kill the running process by specifying the ID and name, respectively.
To use the fg command in Linux, follow the general syntax “fg [Job]”. You can use different symbols to bring the jobs into the foreground in Linux.
In Linux, the ping command is used to troubleshoot networks, including the local machine network. The ping command comes preinstalled on Linux.
The tar command compresses and extracts the files/directories. The tar xvf is used to extract the contents of the archive file with its verbose.
Linux offers the “ps-ef” command that lists out the running processes with the command line arguments passed to the process.
Sort output from largest to smallest by a combination of “du” and “sort” commands with the “h” option. It displays output in a human-readable format.
Linux offers a “more” command that allows you to view the contents of a text file or output one page at a time. The syntax with multiple examples is given here.
In Linux, the “ls” command works with “-l” and “-h” options to display the list of file sizes in a long and human-readable format, respectively.
Linux offers the “fdisk” command to create, delete, and modify the partition in the system. It requires the name of a hard disk to display information.
The “source ~/.bashrc” command in Linux is used to update or refresh the changes made in the bashrc file to be applicable in shells permanently.
In Linux, the “ftp” command is utilized to transfer files between remote systems after establishing the connection through “ftp
To run the SSH command for executing different commands in the remote machine, enter the remote machine’s shell with “ssh user@ip_address”.
In Linux, the “chattr” command is utilized to change the existing attributes of a file such as “i” for immutable, “a” append mode via “+”, “-” operators.
To list down the services using the systemctl command utility on linux, run the command “ systemctl list-units –type=service –all”.
In Linux, the “unlink” command removes the file and link after accessing the required directory. It is useful to remove unnecessary files from the system.
In Linux, the grep command is utilized to highlight (shows the match) the specific word, character, or string after searching the entire content in a file.
The sysctl command allows the user to modify the kernel parameters on the Linux system at runtime. You should only do that if you are fully aware.
To run Linux commands as another user, we can use three commands, i.e., runuser, pkexec, and su. a detailed usage of these commands is provided here.
The “pkill” command kills the execution of currently active processes in linux such as “-f” (full process name), “-o” (oldest process), “-n”(newest process).
The ps command in linux is used to display all the running processes in the terminal. Detailed information about the processes will be displayed.
The “ls” command is used to display the information of the content inside a specific directory. This post has briefly demonstrated the usage of the “ls” command
In Linux, the pwd command prints out the directory you are currently working on and provides an exact path from the root to the current directory.
The diff command is used to make the comparison between two files comparing their every line. The diff command comes pre-installed in Linux distributions
To use the ps aux command in Linux, simply run the ps command with aux options which are used to display the information the all running possesses.
In Linux, the netcat command is utilized to monitor the data across multiple devices within the network. This post has briefly explained the netcat command
The kill command is used to pass different signals in Linux to manage the behavior of the processes. In this blog, the kill command has been explained in detail.
The cp command in Linux is used to copy files and directories from different source locations to the destination in the computer
The cd command in Linux is used to change the directory. We can change our directory to another directory, home directory, or directly to the root directory
su Command in Linux | Switch User
Excerpt: We can switch from one user account using the terminal instantly. To switch from another user account to the already logged-in user, we use the “su command”.
On Ubuntu 22.04 install the Ping command by executing “sudo apt install iputils-ping” on Ubuntu’s terminal and verify the installation by “which ping” command.
The “add-apt-repository” command in Ubuntu 22.04 is used to add repositories from third parties. You can also use it to remove the repositories from Ubuntu
In Linux, the jobs command permits you to interact with the system jobs through the terminal directly. This command is also used to check the states of the jobs and list them with their detailed information. We have explained what jobs command is, its syntax, jobs states, and jobs command options, and its usage in Linux. Also, the procedure of starting a job, running it in the background, then moving it to the foreground is provided in this article.
In Linux, the tee command is used to read the standard output of any command and can store it in a new file. Read out this post to learn more about tee command.
The export command is one of the built-in commands of the bash shell which is used to export the environmental variables from the parent shell to the newly created child shell. In this write-up, we have discussed the export command and explained its utilization in Linux with the help of examples. We also explained the options used along with the export command.
The groupdel command is used to delete the user group when is no more need of the group and also remove from the file /etc/group. This command doesn’t delete the configuration files related to the group but deletes all the entries and account files related to that group. In this article, we have discussed the usage of the groupdel command in Linux to delete the groups with the help of examples.
The groupmod command is used to modify the existing definitions of the groups in Linux which includes its name, GID, and password. This command can be used at any instant of time. There are different options that can be used with the groupmod command to implement these modifications. In this write-up, we have explained the usage of the groupmod command using its different options.
The groupadd command is used to create new groups in Linux, these users can assign specific permissions by granting the permissions to the groups. It is very useful in huge networks, where multiple users can be granted the same permissions by adding them to a single group. In this write-up, we have discussed the usage of the groupadd command in Linux for creating the groups. We have also explained the usage of its different options with the help of examples.
In Linux, using the screen command permits you to create a screen session and open as many virtual terminals as you like within that session. Even if you get disconnected or the screen session is not visible, the jobs or processes running on the screen will continue to perform the respective operations. This guide explains screen command, its syntax, installation method, and its usage in Linux. Also, the screen command options and shortcuts with descriptions are provided in this article.
VIM application is a top-notch text editor. It is a free and open-source text editor that runs on all major platforms with much functionality and support from the programming community. The VIM text editor also offers several useful commands that you should master to get the most out of it. In this article, we explain top 25 most significant vim editor commands.
SELinux (Security Enhanced Linux) is a security protocol for Linux administrators that allows them to acquire more control. The SELinux protocol allows them to enforce the resource policies that represents how much access a program or any user do have. This SELinux is supported by several commands that automates the task of an administrator. In this article, we explain and execution of all basic SELinux commands that a regular user may need to know.
The AWK utility of Linux is quite helpful in manipulating text files. “postprocessing”, “if statement” and “printf” command is frequently used in Linux.
Perf is a lightweight CPU profiling command-line utility that monitors program events and examines CPU performance. The perf command may record CPU performance counters and trace points and is used as a major interface to the Linux kernel’s performance monitoring features. The perf tool helps you improve your system by revealing which applications take the longest to execute. In this article, we explain what Linux perf command is and how you can use it.