I have changed my network configuration and want to restart to make changes effective. Or there are some problems with my network and I think restarting it will solve my problems. Here we will look how to restart networking service in various network distributions like Ubuntu, Debian, Fedora,CentOS. Get Status Of Network Service We will get status of network with the following command. Debian, Ubuntu, Kali For deb based distributions...
Linux popular command cp is used to copy files and folders. In this tutorial we will look different usage types of cp command. Syntax Syntax of cp command is like below.
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...
Copy We will just copy our source file to the destination file.
I have a remote repository which is Git. I want to connect to Git over ssh because there are problems with the firewall rules in our work environment. How can use ssh to connect remotely to Git with specifying ssh keys for this Git operations. Using ssh-agent ssh-agent will create and temprorary environment where tkey is added with ssh-add command into the shell. After environment is completed git operations can be done where...
I want to run my commands securely. Are there anyway for this? Yes there are a lot of options. But the most simple and secure way is running scripts or commands over ssh. Run Command On Remote System SSH is very powerful tool which can invoke provided commands on remote system or server. We will provide the command and options in a double quote. This command will run current users...
I want to connect my Linux server securely. Security is important nowadays. OpenSSH is a secure shell for remote connections. OpenSSH is very popular and have very life saver features. Installation Installation of ssh is like below. ssh full package name is Openssh-server which provides daemon, client and auxiliary tools for ssh. Ubuntu, Debian, Mint, Kali:
$ sudo apt-get install openssh-server
CentOS, Fedora, RedHat:
$ sudo yum install openssh-server
Start Ssh Service After installation if service is not...
Apache or with real name httpd provides logs. These logs are very helpful while detecting errors, attacks. There is two type of Apache logs by default. Log resides in following directories. Log Path Apache logs are stored in different paths because of name difference for different distributions. DEB or apt family uses the name apache2 and stores logs as apache2 but the RPM yum family uses the name httpd and...
Services are all over the Linux world. Enterprise Linux world turn over services. There are different tools to manage Linux services like Sys-V, upstart, systemd etc. Systemd is gaining popularity in recent times. Fedora, CentOs, RedHat uses systemd for a long time. Ubuntu started to use systemd too. Here we will look into basics of the service management with systemd. List Installed Services Linux operating systems like Ubuntu, CentOS, Debian...
I need some application that will provide online file sharing and synchronization. It should be free. Open Source solution is preferred. It seems that we will install OwnCloud which is is an open source, self-hosted file sync and share app platform. There are a lot of things like calendar sync, active feed notifications etc. but for now we will just install ownCloud. Get Repository Keys and Add Repository We need to...
I have a java code and I want to convert it into Utf-8. How can I do it in console. By the way I have multiple files so it need to be do multiple conversion. Getting Info About Character Set We start by getting information about character set. We need to be sure files character set to convert accordingly.
$ file -i main.java
main.java: text/plain; charset=us-ascii
file is very useful tool to get information about files like...
I have some route in my routing table. But I want to delete one route from routing table. How can accomplish this? List Existing Routes To get detailed information about route that will be removed we list the existing routes in our system.
$ sudo ip route show
default via 192.168.122.1 dev ens3
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1
172.16.0.0/24 via 192.168.122.1 dev ens3
192.168.122.0/24 dev ens3 proto kernel scope link src 192.168.122.211
Remove Specific Route This command can be run all modern Linux distributions like Kali, Debian, Ubuntu, Fedora, CentOS. We remove the route by giving specific details...