How to list IP tables in Linux

This is helpful for when you can’t access your localhost (127.0.0.1). Specially if you are having trouble accessing MongoDB after installation. Here is the command: iptables -L –line-numbers Sources: https://dba.stackexchange.com/questions/181693/mongodb-exception-connect-failed

How to hash files in Linux?

How many times have you needed to get the hash of any file in Linux? For whatever purpose you have needed to do that, rest assured that there is a set of commands that will make your life easier. These commands are part of Linux core utils. MD5 md5sum <file_name> SHA-1 sha1sum <file_name> SHA-256 sha256sum <file_name> SHA-384 sha384sum <file_name> SHA-512 …

How to add sudo users in Linux

First of all you have to be logged in as root. Just type command below followed by your password: terminator@skynet:~$ sudo su – [sudo] password for terminator: Now that you are root you can use the following command to create the user: adduser <username> You will be prompted for password, information and confirmation. Once done you can use the following …

How to see running processes in Linux

One essential command to know when you are experimenting in Linux is the command to see which processes are running in your machine, just in case you need to kill one of them for any reason. This command is top and you use it like this: Type top in a Linux Terminal and press Enter: pi@raspberrypi:~ $ top You should …

How to see available disk space in Linux

Playing around with a Raspberry PI I came to need this info. Here is the command: df -h You should see something similar to this: pi@raspberrypi:~ $ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 26G 6.5G 18G 27% / devtmpfs 334M 0 334M 0% /dev tmpfs 463M 0 463M 0% /dev/shm tmpfs 463M 6.4M 456M 2% /run …