Linux common commands (type pwd Whami basename dirname alias)

Source: Internet
Author: User
Tags aliases

Linux common commands (type pwd whoami basenaem dirname alias)

Help class Commands:

View command type: (internal command, external command)

# type command

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/23/wKiom1T3tsCzqNsWAABZKWOJKhw382.jpg "title=" type " alt= "Wkiom1t3tsczqnswaabzkwojkhw382.jpg"/>

Command Help

Internal command:

# Help Command View commands

External command:

# Man Command View command Help

# info comand View command Help

# command--help view commands Help



View currently in that directory: (PWD)

# pwd

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/23/wKiom1T3tvmzqVZbAAAldgde0jU901.jpg "title=" pwd " alt= "Wkiom1t3tvmzqvzbaaaldgde0ju901.jpg"/>


To view the currently logged in User name: (whoami)

# WhoAmI

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1F/wKioL1T3uDzT_JojAABbJtOWP3k094.jpg "title=" Whoami.jpg "alt=" Wkiol1t3udzt_jojaabbjtowp3k094.jpg "/>


Take the base name of the current path: (Note: path is route)

# basename Path

Eg:basename/etc/pm/sleep.d

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/1F/wKioL1T3uGODq2_nAABJNQkuaSo735.jpg "title=" BaseName "alt=" Wkiol1t3ugodq2_naabjnqkuaso735.jpg "/>


Fetch current PATH directory name: (dirname)

# dirname Path

Eg:dirname/etc/pm/sleep.d

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1F/wKioL1T3uPXguBBbAABpHE5jlsY730.jpg "title=" DirName "alt=" Wkiol1t3upxgubbbaabphe5jlsy730.jpg "/>


Command aliases Alias

To view the command aliases that are already defined by the current system:

# Alias

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1F/wKioL1T3uSLAFYhpAADB6jaicdg144.jpg "title=" Alias01 "alt=" Wkiol1t3uslafyhpaadb6jaicdg144.jpg "/>

To create a command alias:

# alias alias = ' Normal Command '

Eg:alias Cls=clear

To revoke a command alias:

# Unalias Aliases

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1F/wKioL1T3uUWRrXvnAAHVZLzHkPg487.jpg "title=" Alias02 "alt=" Wkiol1t3uuwrrxvnaahvzlzhkpg487.jpg "/>


This article is from the "Cai Linux" blog, please be sure to keep this source http://mlybfq.blog.51cto.com/4904679/1617484

Linux common commands (type pwd Whami basename dirname alias)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.