Bash Commands Guide

Durul Dalkanat
5 min readNov 10, 2018

Update: January 5, 2020

Bash is an interactive command-line interpreter or shell. I would like to share the common usage of my shell commands and what they are. I have created this list for time-saving purposes. Because without GUI, all transaction moves faster without mouse usage.

This article is a guide for my next article — Bash Script Guide for iOS Developers, stay tuned for that!


$ history used to sort the commands used for the previous.


$ nslookup allows you to query the IP address directed by the DNS server


$ ifconfig shows the machine’s IP configuration.


Lists the folder and file names in the current working directory.

$ ls -a lists all files including hidden files

$ ls -A lists all files, including hidden files, except a top directory

$ ls -F add an indicator (one of */=>@|) to entries

$ ls -S sort by file size

$ ls -al provides a list of all the files in the same directory

$ ls -l Use a long listing format

$ ls -nl Use a long listing format with user ID

$ ls -c list contents by columns


It is the interface used to view the system’s reference ls also displays all the options available for running the command.

$ man - Print a help message and exit

$ man -V --version Display version information and exit

$ man -C Use the configuration file rather than the default of ~/.manpath.

$ man -d Print debugging information.


Returns a list of the environment variables for the current user.

$ env


To change the permissions of files or directories.

$ chmod 777 anyone can read, write and execute chmod 777 my_file