Category: Miscellaneous

How To Change Time Zone In Linux

Today I will be showing you how to quickly and easily change your time zone on a Linux system. To do this we will be searching for the closest time zone file New York for example, and then copying it over /etc/localtime. This file is what your system uses to get the local time, you should not try to edit …

How To Change Default SSH Port In Linux

One of the things you should do when first setting up your new server is changing the SSH port. This is not because it will actually stop a real attacker but because your server will be hammered with automated random login attempts, so the real reason why we will change the default ssh port is so that when the automated …

Using CAT And Bash Redirection To Write To Files

In this post I will show you how to use bash redirection to write to a file using the cat command. This is a very simple trick that you can use for all sorts of things when it comes to bash scripting including setting up certain configuration files when more powerful options aren’t available or aren’t worth using. You can …

Writing A Basic Expect Script For Automating Tasks

Today I will be showing you how to use a basic expect script inside of your bash scripts for automation. Expect works just like the name sounds, expect to see a prompt or other piece of text and then send the response. With this you can do things such as automatically entering password for SSH (not recommended for daily use), …