DAY2:Getting started with linux

Shreshta ThiruShreshta Thiru
1 min read

Getting started with linux

Linux Basic commands

Commands

*date -shows today's date and in UTC

*cal-show the calendar for the current month

*uptime-shows the uptime like how long the system is on and running

**whoami who w users id all these commands shows similar information

*Whoami-who is logged in as

*who/w-displays which user is available/online now

*users/id-shows user information

Creating files/directories

*mkdir-used to create directory

*Make nested direcotires-

mkdir -p Dir1/Dir2/Dir3/Dir4

mkdir -p A/B/C/D (A,B,C,D ARE DIRECOTRIES)

*touch -used to create a file

*vi- creates a file if doesn't exist :vi filename hit enter

*nano-to create and open a file if file doesn't exist

hit enter

Deleting a file/directory

*rmdir- removes a directory if directory is empty

*rm -rf : removes the directory and its contents recursively removes all the files and then the directory

*rm - removes a file

0
Subscribe to my newsletter

Read articles from Shreshta Thiru directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shreshta Thiru
Shreshta Thiru