Kali Linux – File Management
Last Updated :
22 Jun, 2020
In Kali Linux, most of the operations are performed on files. And to handle these files Kali Linux has directories also known as folders which are maintained in a tree-like structure. Though, these directories are also a type of file themselves. Kali Linux has 3 basic types of files:
- Regular Files: It is the common file type in Linux. it includes files like – text files, images, binary files, etc. Such files can be created using the touch command. They consist of the majority of files in the Linux/UNIX system. The regular file contains ASCII or Human Readable text, executable program binaries, program data, and much more.
- Directories: Windows call these directories as folders. These are the files that store the list of file names and the related information. The root directory(/) is the base of the system, /home/ is the default location for user’s home directories, /bin for Essential User Binaries, /boot – Static Boot Files, etc. We could create new directories with mkdir command.
- Special Files: Represents a real physical device such as a printer which is used for IO operations. Device or special files are used for device Input/Output(I/O) on UNIX and Linux systems. You can see them in a file system as an ordinary directory or file.
In Unix systems, there are two types of special files for each device, i.e. character special files and block special files. For more details, read the article Unix file system.
You can read more about the Linux File Management.
Kali Linux follows a specific File hierarchy structure which is just a way of organizing files, filesystems, directories, installed packages, and external devices connected to the system. It basically sets a standard or a base for defining the directory structure.

In Kali Linux File Hierarchy Structure the base or the main directory which contains all the directories is the root directory depicted by a “/”.
Managing and Working with Files in Kali Linux
1. To List the Files. In Kali Linux, we use ls command to list files and directories. To use this enter the following command in the terminal.
ls

This command will print all the file and directories in the current directory.
2. To create a new file. In Kali Linux, we use touch command to create a new file. To use this enter the following command in the terminal.
touch filename.extension

This command will create a new file named filename.extension.
3. To display the content of a file. In Kali Linux, we use cat command to display the contents of a file. To use this enter the following command in the terminal.
cat filename.extension

This command will print the content of the filename.extension file.
4. To copy files. In Kali Linux, we use cp command to copy files and directories. To use this enter the following command in the terminal.
cp old/location/of/file /new/location/of/file

This command will copy file form old location to new location.
5. To move files. In Kali Linux, we use mv command to move files and directories. To use this enter the following command in the terminal.
mv old/location/of/file /new/location/of/file

This command will move the file form old location to new location.
6. To rename a file. In Kali Linux, we use mv command to rename files and directories. To use this enter the following command in the terminal.
mv filename.extension new_name.extension

This command will rename the file from filename.extension to new_name.extension.
7. To delete a file. In Kali Linux, we use rm command to delete files and directories. To use this enter the following command in the terminal.
rm filename.extension

This command will remove/delete the filename.extension from the current directory.
8. To edit a file. In Kali Linux, we use nano command to edit files. To use this enter the following command in the terminal.
nano filename.extension

This command will open an editor to write to file and after completing the same press ctrl+o to save the file.
Similar Reads
Kali Linux - File Management
In Kali Linux, most of the operations are performed on files. And to handle these files Kali Linux has directories also known as folders which are maintained in a tree-like structure. Though, these directories are also a type of file themselves. Kali Linux has 3 basic types of files: Regular Files:
4 min read
File Management in Linux
In Linux, most of the operations are performed on files. And to handle these files Linux has directories also known as folders which are maintained in a tree-like structure. Though, these directories are also a type of file themselves. Linux has 3 types of files: Regular Files: It is the common file
4 min read
Maltego Tool in Kali Linux
Maltego is an open-source intelligence forensic application. Which will help you to get more accurate information and in a smarter way. In simple words, it is an information-gathering tool. Features of Maltego: It is used for gathering information for security related work. It will save your time an
2 min read
10 Best File Managers For Linux
File Managers are something that is required to manage your daily activities quickly. Using file managers, you can copy, move, rename, and delete files, manage space, manage disks, etc. As a user, we all look for an easy and simple file manager to handle these tasks without having any trouble. Mostl
14 min read
Sparta Tool in Kali Linux
Information Gathering is a very important step before starting penetration testing. Mostly, Pen Testers begin their work by collecting information and this requires a lot of patience and effort. The information Gathering category has many tools that work differently, but the sole purpose is to gathe
3 min read
Linux File System
Operating systems, the software that powers your computer, rely on a crucial element known as the file system. Think of it as a virtual organizational tool that manages, stores, and retrieves your data efficiently. In the Linux world, a diverse range of file systems has emerged, each crafted to addr
11 min read
System Requirements for Kali Linux
Kali Linux is a Linux distribution that is mostly used by cybersecurity professionals, penetration testers, and ethical hackers. Kali Linux offers many of the tools dedicated to various information security tasks such as reverse engineering, security research, penetration testing, computer forensics
6 min read
How to Open a File in Linuxâ
In Linux, a file is a fundamental unit of storage, representing everything from documents and images to system logs and program data. Unlike traditional operating systems, Linux treats almost everythingâfiles, directories, devices, and processesâas a file. Whether you're accessing a simple text docu
6 min read
Maintaining Access Tools in Kali Linux
Maintaining Access is the 4th phase in the ethical hacking process. In this phase, the hacker installs software or makes changes to the target machine to access the target later in time. This allows the hacker to stay connected with the target machine, thus cutting the need of starting the process f
8 min read
Features of Kali Linux
Kali Linux (formerly known as BackTrack Linux) is an open-source, Debian-based Linux distribution aimed at advanced Penetration Testing and Security Auditing. It is introduced in 2013 by rebuilding the BackTrack Linux. Kali Linux is a popular operating system among Security researchers and Computer
3 min read