Linux Commands: Part 2

June 13, 2022, 7:35 p.m.


Linux Commands: Part 2

This part covers the different commands that can be used on the Linux shell or terminal
One thing to note is that the commands are case-sensitive.


open the terminal

Basics: 


1. pwd - prints the current working directory of the currently logged in user

pwd
/home/dannydev


2. clear / CTRL+L - clears the terminal screen

3. cd directory name - enter a directory
cd .. - go back to parent directory

cd Desktop
pwd
/home/dannydev/Desktop

 

4. whoami - prints the user name. For example, as a 

whoami
dannydev

5. mkdir directoryName - creates a folder with a specified name
    rmdir directoryName - removed the specified folder


6. hostname - prints the name of the host - the hostname here refers to
    the name of the machine on the network
    For my case I named it dannydev

hostname
dannydev

7. date - prints current local date

date
Mon 13 Jun 2022 06:20:09 PM EAT

8. uptime - tells how long the system is up

uptime
18:20:39 up 28 min, 3 users, load average: 0.02, 0.23, 0.27

9. tree command - lists the contents of the current directory in tree-like format
NB: if the command is not available  run this command to install

sudo apt install tree

1 Comment

Mike - 2 years, 6 months ago


Great work. Hope to see more

whatsapp