How to change the hostname in Linux

This article describes the how the change the hostname in Linux machine. Let’s start. Open the network file. # sudo vi /etc/sysconfig/network Modify the HOSTNAME= value with your domain name. Example hostname is “myhostname” HOSTNAME = myhostname To access with in the server add it in /etc/hosts file 127.0.0.1 myhostname Run the “hostname” command. This command… Read More

Linux – 10 Useful Networking Commands

Linux is powerful operating system and open source. It provides many inbuilt networking commands for troubleshooting. Here 10 useful networking commands. 1. ifconfig – configure a network interface We can configure network interface related parameters using the ifconfig command, in general, we use ifconfig command to check the IP address.  root@kali:~# ifconfig 2. dig: DNS lookup utility dig… Read More

Linux Directory Commands

Directory Commands ls– This command ‘lists’ the contents of your present working directory. pwd- Shows you what your present working directory is. cd– Lets you change directories. rm– Removes one or more files. rmdir– Remove an empty directory. mkdir– Make a directory. ps– Provides a list of currently running processes. cp– Copy a file. mv– Move a file (this is also used to rename a file, “moving” it… Read More

SFTP files upload and download automation in Linux using shell script

SSH File Transfer Protocol (also Secure File Transfer Protocol, or SFTP) is a network protocol that provides file access, file transfer, and file management over any reliable data stream SFTP server default port is 22. sftp command syntax : (man sftp) sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config] [-o ssh_option] [-P sftp_server_path] [-R num_requests] [-S program] [-s… Read More

Linux File Commands

  File Administration ls [option(s)] [file(s)] If you run ls without any additional parameters, the program will list the contents of the current directory in short form. -l detailed list -a displays hidden files cp [option(s)] sourcefile targetfile Copies sourcefile to targetfile. -i Waits for confirmation, if necessary, before an existing targetfile is overwritten -r Copies recursively (includes subdirectories) mv [option(s)] sourcefile targetfile Copies sourcefile to targetfile then deletes the original sourcefile. -b… Read More