Customizing and colorizing Linux bash prompt

Rate this post

74 views

bash

Overview

Sometimes you get bored with the way the bash prompt looks like and you want to customize it by adding some useful features or changing colors. The default Bash prompt usually ends with a dollar sign $. Bash itself will show its major and minor version (\s-\v\$), for example, bash-3.00$. Most Linux distributions redefine the prompt to include additional information, such as your current login and computer, which is useful when you’re moving between accounts and computers. In order to customize the bash prompt we need to modify the $PS1 and $PS2 environment variables by our desire.

Bash will use the value of the $PS1 variable for your main prompt. If you include variable names in the string, Bash will substitute the value of the variables into your prompt. Bash has a PS2 (prompt string 2) variable, which is the prompt for incomplete command lines such as when you use a multiline quotation. By default, this prompt is a greater-than sign (>).

Continue reading…

Customize bash history in Linux

5 (100%) 1 vote

85 views

bash

Overview

If you are a fan of the bash prompt and you have used Linux for some time it is quite likely that you have used the history command in your daily work. This command is used to recall previously entered commands at the bash prompt. This is an important feature of bash which could save you a lot of time for example if you type really long commands. By default the history option in bash is enabled. If somehow the option is not active you could turn it on by running the following command:

Continue reading…

Scheduling tasks using crontab in Linux

5 (100%) 1 vote

119 views

bash

Overview

Cron is a Linux/UNIX service that allows users to run scripts or programs automatically at a specified time and is commonly used to automate system maintenance or administration. It starts when the system boots and runs in the background as long as the system is up. The cron daemon is similar to the Task Scheduler application from Windows. It’s often useful to have a script or command executed without any human intervention. For example, you might want to have a script that creates regular backups of your files and folders and stores them in a specified location. For this cron is the perfect tool to do the job.

Continue reading…

Configuring a Cisco router or switch as a DHCP server

Rate this post

146 views

cisco

Overview

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol which allows you to allocate network configuration parameters like IP addresses, subnet masks, DNS servers, default gateways and many more to end devices. This protocol uses the UDP ports 67 and 68 as defined in RFC 2131. Nowadays allmost network devices support DHCP including workstations, printers, IP phones, handheld devices etc. Using dynamic IP address assigment you can minimize errors which can appear on manual configuration and also reduce the administrative overhead. Cisco embedded the DHCP server functionality beginning with IOS Version 12.0(1)T. By default, the Cisco IOS DHCP server and relay agent features are enabled but are not configured.

Continue reading…

Creating and configuring VLANs on Cisco Catalyst switches

5 (100%) 1 vote

92 views

cisco

Overview

A VLAN (Virtual LAN)is a term derived from LAN (Local area network) and represents a logical grouping of hosts with the same set of requirements. All host in a VLAN communicate as if they were attached to the same broadcast domain, regardless of their physical location. By grouping several switch ports in different VLANs we are creating separate logical broadcast domains. All member ports of the same VLAN can communicate between them without using any Layer 3 routing. In order to allow communication between different VLANs we must use a layer 3 device like a router or we can use SVIs (Switched virtual interfaces). Using VLANs can provide the following benefits:

Continue reading…

Page 3 of 4« First...234