how to make shell script executable from anywhere in linux

Example of Shell Script File

In Linux, shell scripts are the standard staple of everyday life. Most programs or software in Linux and Unix use some script file to start or run. It is roughly equivalent to executable files in Windows. You will also be able to create custom shell scripts to automate many of the everyday tasks as well. It is not uncommon to end…

what are shell scripts in linux and why you need them

Example of Shell Script File

A Shell Script is nothing but a text file which contains a series of commands that can be executed by the shell or the underlying operating system. Some of the commands that you enter in the command line might actually be shell scripts that execute a set of other lower level commands. Also many software in Linux use shell scripts…

what is a command shell in linux

Reload shell profile environment in linux

Many posts on this site deals exclusively with how to get things done in Linux using just a command shell. We use the terms shell, command shell, command prompt, command line, console and terminal interchangeably most of the times. In most cases, it does not matter and it all means the same but there is some subtle differences between shell…

7 simple keyboard shortcuts you should know in linux command shell

Reload shell profile environment in linux

When using the command shell or terminal in Linux, there are several keyboard shortcuts available to you that perform common functions. Many of these shortcuts are common across many of the different shells, such as bash, csh, ksh or fish. That means you do not have to remember different commands for different shells. We will see some common keyboard shortcuts…

how to create an XML sitemap using wget and shell script

Snippet from an XML Sitemap

A SiteMap or Site Map is a file that lists the pages of a webpage that are accessible to users and search engines. This can be in any format as long as whoever is reading it can understand the format. There are mainly two types of format that are used when creating a site map: XML and HTML. All websites…

how to change the default shell of an user in linux?

finding default shell in linux

There are several different command shells available to you in Linux. bash, csh, tcsh, ksh, zsh, sh and fish are just a few of the popular ones that can be used by an user from the command line. As a system administrator, you can specify a default shell for the user. The user can however choose the run another shell…

how to reboot, logout or shutdown linux machines from command line

Options to Shutdown Linux

All desktop environments has menu options to shut down and reboot machines. Most times there are also keyboard shortcuts that the X or the desktop support that allow you to shut down machines. The most commonly used keyboard shortcut is Ctrl+Alt+Del. Although these menu options and keyboard shortcuts makes it easier, it is beneficial to know the command line options…

how to enable and disable colors in linux command shell

ls command in color

Many modern command shells and commands are capable of displaying its output in color. Most times it is a combination of the shell and the command that provides the ability to display the text in color. The terminal displays these colors in response to some ANSI encoded control sequences generated by the command as part of its output. You can…

how to determine the current command line shell in linux

Reload shell profile environment in linux

Linux has many different command line shells that can be used. And different Linux distros use different shells as default. Sometimes you might also be using different shells in different terminals. You can use sh, bash, csh, ksh, zsh among the very many that are available. Most times it is not obvious from the command line as to what shell…

how to reload shell profile without restarting the command prompt in linux

Reload shell profile environment in linux

In Linux there are several options that can be set in the shell profile or shell environment, such as the environment variables. The environment variable can be the path, the classpath or prompt display among various others. Every time you edit one of the shell profile files, you need to reload shell profile or the command shell itself for the modifications…