Blog Archives

Setting a text editor for visudo

As you know, the recommended way for editing the/etc/sudoers file is with visudo. Visudo opens the /etc/sudoers file with the default text editor, and warns you if you save code with errors. Visudo reads the SUDO_EDITOR, VISUAL and EDITOR variables,

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

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!

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!

Just another “Unix and Linux shells” article

Traditionally, the default shell in the Unix systems is dash, for both the users and the system scripts. On GNU / Linux distros, bash has always been the default shell. Some new GNU / Linux distros use dash  as the

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

How to install zsh in FreeBSD ; How to set zsh as the default shell in FreeBSD

The Z shell (zsh) is a powerfull bash compatible shell. It can easily be installed on every Linux or Unix distro. In this article I will install zsh in FreeBSD and PCBSD and set zsh as the default login shell.

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 /etc/shells file

As you know, all the files from /etc are very important for the Unix / Linux systems. The /etc/shells file contains a list of all the shells available in the system. Sample of /etc/shells file: $ cat /etc/shells # /etc/shells:

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!