- Kali Linux Tutorial
- Kali Linux - Home
- Installation & Configuration
- Information Gathering Tools
- Vulnerability Analyses Tools
- Kali Linux - Wireless Attacks
- Website Penetration Testing
- Kali Linux - Exploitation Tools
- Kali Linux - Forensics Tools
- Kali Linux - Social Engineering
- Kali Linux - Stressing Tools
- Kali Linux - Sniffing & Spoofing
- Kali Linux - Password Cracking Tools
- Kali Linux - Maintaining Access
- Kali Linux - Reverse Engineering
- Kali Linux - Reporting Tools
- Kali Linux Useful Resources
- Kali Linux - Quick Guide
- Kali Linux - Useful Resources
- Kali Linux - Discussion
How to display the current working directory in the Linux system?
To print the current working directory, we use the pwd command in the Linux system.
pwd (print working directory) – The pwd command is used to display the name of the current working directory in the Linux system using the terminal. This is a shell building command that is available in most Unix shells such as Bourne shell, ash, bash, kash, and zsh.
The general syntax of the pwd command is as follows −
A brief description of options available in the pwd command.
|Sr.No.||Option & Description|
Display the value of $pwd if it names the current working directory
Display the physical directory, without any soft link
Displays a help message and then exits.
By default, the pwd works as if -L option was specified.
The pwd command returns true unless an invalid option supplied or the current directory could not be read.
To display the current working directory, we use the pwd command in the Linux/Unix system as shown below.
vikash@tutorialspoint:~ pwd /home/vikash
To display the physical directory instead of symbolic links or soft links, we use -P option with the pwd command in the Linux/Unix system as shown below.
vikash@tutorialspoint:~ pwd -P /home/vikash
To display more about the pwd command we use -help option with the pwd command as shown below.
vikash@tutorialspoint:~ pwd --help
After execution of above command. It will be prompt a short description with available options available in the pwd command.
- Related Articles
- Find the Current Working Directory of a Running Process in Linux
- How to change the shell working directory in Linux?
- How to set the current working directory in Python?
- Get the Current Working Directory in Java
- How to know current working directory in Python?
- Find out the current working directory in C/C++
- Java Program to Get Current Working Directory
- Golang program to get current working directory
- How to display the first part of the file in the Linux system?
- How to display the last part of the file in the Linux system?\n
- How to list the directory content in Linux?
- Specifying working directory while executing FM SXPG_COMMAND_EXECUTE in SAP system
- Linux – How to find the files existing in one directory but not in the other directory?
- How to get the current username and directory in Golang?
- How to flushes file system buffers in the Linux operating system?