dir -l folder details the files and folders in the current directory, or folder folder . ls -a folder dir -a folder lists all files and folders (including hidden) in the current folder, or folder folder . ls -d folder dir -d folder lists folders in the current directory, or folder folder . ls -t folder dir -t folder lists files and folders in the current directory, or folder folder , and then reorder by date, nearest to the top and then display. ls -S folder dir -S folder lists the files and folders in the current directory, or in the folder folder , then sort by size, the largest above and then displays. ls folder | more lists files and folders in the current directory, or in the folder folder and displays on each page.
Distributed file permissions
chown userfile identifies the owner of the file file as the user . chown -R userfolder determines who owns the folder folder is the user . chgrp groupfile defines the group of file owners. chmod u + x file grant permission (+) executable (x) file file for user (u) owned. chmod gw file to collect (-) write (w) file for user group (g) owned. chmod or file captures (-) reads the file (r) for other users (o). chmod a + rw file grant (+) read (r) and write (w) file for the entire user (a). chmod -R a + rw folder grant (+) read (r) and write (w) folder folder and messages and sub files for the entire user (a).
The Kali Linux command manipulates files and folders
cp file1file2 copy file file1 to new file2 . Copy the folderfile to copy the file to the folder folder and keep the name. cp -r folder1folder2 rsync -a folder1folder2 copies the folder1 folder and subdirectories to the new folder2 folder. mv file1file2 moves file1 to new file2 . mv folder1folder2 move the folder1 folder to the new folder2 name. mv filefolder moves the file to the folder folder and keeps the name. mv file1folderfile2 moves the file to the folder folder and renames it into a mkdir folder2file to create the folder folder . mkdir -p folder1folder2 creates folder1 folder and folder2 folder (if not yet) rm file deletes the file . rmdir folder deletes the empty folder folder . rm -rf folder deletes the folder folder and subfolder files (rf). ln -s filelink creates link (shortcut) link to file . find folder -name file to find the file file in the folder folder and subdirectories. diff filefile compares the contents of two files or two directories
The Kali Linux command works with file content
cat file export the entire file content to the Terminal screen. more file to export the content of file file by page, Enter down one line, Space down one page and q to exit less file to export file file contents, like more commands but can use Page Down button. head -n file displays the first n lines of the file file . tail -n file displays the last n lines of the micro file file compiling the file file with the vi editor. nano file compiles file file with nano editor. gedit file compiles file file with gedit editor. grep the filetext to export the lines containing the text in the file file grep -r textfolder find the text in all the files in the command > folderfile, write the output to the Terminal of the command to the command file file >> The file writes the output to the Terminal of the command at the end of the file
Command Kali Linux basic system
The sudo command executes the command with superuser permissions. gksudo command is similar to the sudo command but used for GUI applications. sudo -k stops processes with superuser rights. uname -r shows the version of the kernel you are using. shutdown -r now immediately turns off and reboots. lsusb lspci lists the USB or PCI devices that are connected. The time command indicates the time to execute commandcommand1 |command2 passes the result of command1 as the input of command2
Kali Linux command controls the process
ps -ef shows all the processes that have been performed (pid et ppid) .ps aux shows detailed processes. aux aux | grep soft shows details of the processes related to the soft kill pid program that turns off the xid process to turn off the GUI process.
Kali Linux commands work with computer networks
/ etc / network / interfacesfile configuring the network interfaceuname -a hostname shows the name of the computer in the network (hostname). ping address Ping to the address of the address . ifconfig -a displays information about existing network cards. ifconfig interface ip-address specifies the static ip address for the specified network card. ifdown interface ifconfig interface down stops the specified network card operation. ifup pid ifconfig interface up starts the specified network card. route add default gw ip-address specifies the default gateway address. routing del default leaves the default gateway address.
Kali Linux command partition hard drive
/ etc / fstab file contains information about the hard drive and file system automatically mounted. fdisk - lists the current hard drives and partitions.fdisk / dev / hda1 changes the hard drive hda1mkfs.ext3 / dev / hda1 create ext3 file system on hard drive hda1.mkfs.vfat / dev / hda1 create fat32 file system on hda1 hard drive
Hopefully, the commands on using your Kali Linux operating system will be easier.
Explore more:
How to run 2 or more Terminal commands at the same time on Linux
Basic Linux commands everyone needs to know
Guide to network operation for Linux users: 11 commands to know