WhileNetworking

  • Home
  • CCNA
  • Cisco Packet Tracer Download
    • Cisco packet tracer 6.3
    • cisco packet tracer 6.2
    • Cisco Packet Tracer 7
  • Linux Server Management
  • About Us
  • Privacy Policy
  • Contact Us

Linux basic commands using CLI mode

You are most welcome to this post.
After changing permission mode, see the file
Really thanks to you for your interest in this topics. :)

In this post we’ll see some Linux basic commands. All the commands are typed in CLI mode. We’ll see the command and the output.

Linux basic command using CLI mode

 

Before going to the command just remember that:

 

Blue color indicates the directory

Black and white color indicates the file

Red color indicates compress file (rpm/zip/rar)

Green color indicates the execute file

Yellow color indicates the Device (That is terminal/cd/dvd/usb/hdd)

Cyan color indicates the link file.

Magenta color indicates the picture/image/media

 

After logged in my Linux I’ve logged in as root user.

 

[ece@localhost Desktop]$ su root

Password:

[root@localhost Desktop]#

 

So successfully logged in as root user. You can see this.

Now I need to change the directory. As you can see there, currently I’m in the directory named “Desktop”. By changing it, I want to go to the home directory. So I used “cd” command:

 

[root@localhost Desktop]# cd

[root@localhost ~]#

 

You can see that, I changed my directory successfully. Desktop writing is not appeared here.

Now, I want to see the directory list.

 

[root@localhost ~]# ls

 

The output of this command is:

anaconda-ks.cfg  Documents  Maildir  Pictures  Templates

Desktop          Downloads  Music    Public    Videos

 

You can see the list of directories here. Also the folders are in blue color here.

 

Now I want to see the list of directories in detail. The command is:

[root@localhost ~]# ls –l

 

The output is

 

total 4

-rw——-.            1             root root              1494      Mar  4   08:02     anaconda-ks.cfg

drwxr-xr-x.         2             root root             6              Mar  4 02:09     Desktop

drwxr-xr-x.         2             root root             6             Mar  4   02:09     Documents

drwxr-xr-x.         2             root root              62           Mar  9   03:14     Downloads

drwx——             5             root root              36           Mar 20 05:13     Maildir

drwxr-xr-x.         2             root root             6             Mar  4   02:09     Music

drwxr-xr-x.         2             root root             6             Mar  4   02:09     Pictures

drwxr-xr-x.         2             root root             6             Mar  4   02:09     Public

drwxr-xr-x.         2             root root             6             Mar  4   02:09     Templates

drwxr-xr-x.         2              root root            6              Mar  4 02:09     Videos

 

You can see the file/folder permission here, also modification date, and also so many detail information.

But here, you can’t see the hidden file, so we’ll locate the hidden files.

 

[root@localhost ~]# ls –la

 

The output of this command is:

 

total 80

dr-xr-x—. 17 root root 4096 May  5 22:18 .

.

.

.

.

.

drwx——   5 root root   36 Mar 20 05:13 Maildir

-rw——-   1 root root  132 May  5 22:18 .xauthiUFC7W

-rw——-   1 root root  132 Mar 21 05:25 .xauthkPJ4o6

-rw——-   1 root root  132 Mar 20 04:50 .xauthL2Zih5

-rw——-   1 root root  132 Mar 21 04:55 .xauthVXH9gg

-rw——-   1 root root  132 Mar 15 02:37 .xauthwsle7w

 

[root@localhost ~]# ls -li

total 4

38791939 -rw——-. 1 root root 1494 Mar  4 08:02 anaconda-ks.cfg

38791951 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Desktop

38791952 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Documents

52121270 drwxr-xr-x. 2 root root   62 Mar  9 03:14 Downloads

51590667 drwx——  5 root root   36 Mar 20 05:13 Maildir

52121271 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Music

2875329 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Pictures

19407243 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Public

2875328 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Templates

19407244 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Videos

 

Hope that you’ve realized!!

 

Now, we want to see the list of inode no.

 

[root@localhost ~]# ls –li

 

The output is:

 

total 4

38791939 -rw——-. 1 root root 1494 Mar  4 08:02 anaconda-ks.cfg

38791951 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Desktop

38791952 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Documents

52121270 drwxr-xr-x. 2 root root   62 Mar  9 03:14 Downloads

51590667 drwx——  5 root root   36 Mar 20 05:13 Maildir

52121271 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Music

2875329 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Pictures

19407243 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Public

2875328 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Templates

19407244 drwxr-xr-x. 2 root root    6 Mar  4 02:09 Videos

 

Want to show the SELinux context?

 

[root@localhost ~]# ls –lZ

 

The output is:

 

.

.

.

.

drwxr-xr-x. root root unconfined_u:object_r:admin_home_t:s0 Videos

 

ls-lz, linux basic command

ls-lz, linux basic command

 

Now come to the point that, we want to see the size which is human readable:

 

[root@localhost ~]# ls –lh

 

Output is:

 

total 4.0K

-rw——-. 1 root root 1.5K Mar  4 08:02 anaconda-ks.cfg

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Desktop

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Documents

drwxr-xr-x. 2 root root   62 Mar  9 03:14 Downloads

drwx——  5 root root   36 Mar 20 05:13 Maildir

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Music

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Pictures

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Public

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Templates

drwxr-xr-x. 2 root root    6 Mar  4 02:09 Video

 

 

May 22, 2016Himadri
 

Share with friends :

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related

Introduction to Linux file system and command interfaceLinux basic command using CLI (more)

Leave a Reply Cancel reply

16 − fifteen =

Himadri

Hi, I'm Himadri. I love blogging with tech topics, specially computer networking. We'll have more fun in the upcoming day. Stay with me. :)

May 22, 2016 Linux installation and server managementLinux Basic command system, linux cli, server management214
Feel Free to Share :)
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Find Us on Facebook
Choose a category !!
  • CCNA
  • Cisco Certification Exam
  • cisco packet tracer 6.2
  • Cisco packet tracer 6.3
  • Cisco Packet Tracer 7
  • Cisco Packet Tracer 7.1
  • Cisco Packet Tracer 7.2.1
  • Cisco Packet Tracer 7.3
  • Cyber Security
  • Engineering Ebooks
  • Excel
  • IELTS Ebook
  • Internet
  • Know computer
  • Know your computer
  • Laser Processing of Material
  • Linux installation and server management
  • PDF
  • Technology
  • Uncategorized
Top posts
  • Packet tracer 6.2 student version for Linux - Free download
  • Free download Cisco Packet Tracer 7 for linux (64 bit)
  • Know about Host-Based Intrusion Prevention System
Archieves
Get latest updates by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other subscribers
W
SC
wordpress counter
Analytics
Recent Comments
    Browse by categories
    Cyber SecurityLinux installation and server managementCCNAKnow your computerKnow computerCisco Packet Tracer 7UncategorizedCisco Certification ExamInternetPDFCisco Packet Tracer 7.3Engineering EbooksCisco packet tracer 6.3cisco packet tracer 6.2Cisco Packet Tracer 7.1TechnologyExcelLaser Processing of MaterialCisco Packet Tracer 7.2.1IELTS Ebook
    Feel free to contact with us

    Hi, any kind of comment or suggestion is valuable to us. So feel free to contact with us.

    Email: himadri.shekhar.bd@gmail.com

    Name: WhileNetworking.com

    2021 © WhileNetworking
     

    Loading Comments...