Blog Archives

Share PATH, aliases and functions between Bash and Zsh

Sharing the aliases, customized PS1 (prompt), functions and PATH/CDPATH between the zsh and bash shells is very usefull. To my mind, the cleanest way to do this is to create a new file, having the portable shell settings stored there

Tagged with: , , , , , , , , , , ,
Posted in The Linux and Unix Articles!

The bash !$ trick: Insert the last argument of the previous command in the current command

The !$ trick works on bash, csh, tcsh and zsh, but does not work on ksh. The !$ trick is very usefull in the Linux and Unix shells. In the Bash shell, the !$ inserts (and expands) the last used

Tagged with: , , , , , , , , , , , ,
Posted in The Linux and Unix Articles!

10 Bash Tricks Every User Should Know About

In this article I will show my favourite bash tricks. Because I am very lazy, I adore all the dirty tricks that can make my bash usage easier. 1-2 : The PATH and the CDPATH. The PATH and CDPATH are

Tagged with: , , , , , , , , , , , , ,
Posted in The Linux and Unix Articles!

2 Bash tricks: TAB-TAB and Case Insensitive Completion

In this article I will show you two bash inputrc tricks. The first one is: set show-all-if-ambiguous on. Add this to your ~/.inputrc file because it is very usefull. When pressing TAB for command completion, all the matches will be

Tagged with: , , , , , , ,
Posted in The Linux and Unix Articles!

Bash trick: Reverse-i-search

The bash reverse-i-search is very usefull when needing to lookup for a command in the history. Press Ctrl – R and you get this: (reverse-i-search)`’: Type parts of the command you need to find and bash will give you the

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

How to cd into a directory only by typing the directory name

In this article I will show you how to cd into a directory by only typing the directory name. To do this, you have to activate the autocd. For bash: shopt -s autocd $ ls -ld naboo drwxrwxr-x 2 razvan

Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!

Bash wildcards: the square brackets [ ] and the curly brackets { }

In the previous wildcard post, I taught you how to use the asterisk * and the question mark ? wildcards. This article is about other, not so popular wildcards: the square brackets [ ] and the curly brackets {}. Note:

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

How to set a new PATH in bash, ksh and zsh

The PATH is an environment variable that tells the shell where to look for the basic executables (commands) you use (such as ping, useradd, etc). Setting a new PATH depends on the shell, not on the Linux or Unix distro.

Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!

The !! bash trick: Insert the last used command

There are a few bash shortcuts (tricks), that make my life easier every day. One of my favourite bash tricks is !! . !! relaunches the last used command. The benefit of the !! is that it can be combined

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

How to set and use the Linux CDPATH variable with bash

The CDPATH is an environment variable, just like PATH. It is used to cd directly in the folders you add in your CDPATH. By default, your CDPATH is empty but you can easily set it, as you like. Difference between

Tagged with: , , , , , , ,
Posted in The Linux and Unix Articles!
Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!