How to remove files by their inode

Sometimes we have to remove files with weird names, like “-h”. rm -h does not work because the shell sees “-h” as a command option. So, how can we delete these file? Simple: by it’s inode. A file’s inode can

How to install the zsh shell in Linux; how to set it as a default login shell

Z shell’s (zsh) popularity has increased in the last years. I have not moved too zsh yet, but I am going to do that. zsh is not installed in Linux by default, but it can be installed¬†easilly with a package

How to install, delete and purge packages with dpkg:

Debian/Ubuntu or Linux Mint are dpkg based. dpkg is a low level tool, mostly for installing and removing packages. If you fail to install/delete a package with the Apt package manager, try that with dpkg: Listing the files in the

Bash wildcards: ? (question mark) and * (asterisk)

The usage of wildcards is a nice feature that the shell provides us. Simple characters such as * or ? can make our bash life much more easier than we have ever imagined. Wildcards are special characters that allow us

How to redirect the standard output and the standard error in Unix

Sometimes you need to redirect the standard output (stdout) and / or the standard error (stderr). > or 1> redirects the stdout and 2> redirects the stderr. 1. Redirecting the stdout to file: command 1> file # ls /etc/grub.d/ >

How to verify if a package is installed in Debian and Fedora

How to find if an application is installed or not in your Linux distro, depends on that distro’s package manager. Find out if an application is installed in Debian with dpkg -l: This also works on Ubuntu/Linux Mint or other

The ultimate guide for using the Apt package manager

Apt is the package manager for Debian/Ubuntu/Linux Mint and other debian based distros. It is good because it solves the dependences. Use dpkg to install packages just if the installation failed with apt. 1. Searching the repositories for the packages

The ultimate guide for creating and removing directories

One or more directories can be created with a single mkdir command. 1. Creating directories: Syntax: mkdir [options] dirname $ mkdir dir1 dir2 dir3 $ ls -l drwxrwxr-x 2 razvan razvan 4096 2012-05-29 10:45 dir1 drwxrwxr-x 2 razvan razvan 4096

How to get root access inside Vim

It often happens to forget to use sudo when editing configuration files with vim. You write your modifications and when you want to save, you get the annoying error: “E45: ‘readonly’ option is set (add ! to override)”. The following

How to delete users in Linux with the generical userdel command

We already know how to create users in Linux, now let’s learn how to delete them: userdel The generical low level tool for deleting users is userdel: Syntax:userdel [options] user $ tail -3 /etc/passwd | cut -d ‘:’ -f 1,6

Subscribe

  

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