Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

kali Linux cheat sheet, Cheat Sheet of Computer science

This is a good beginning cheat sheet for people learning at a newer level about kali Linux set up and the commands. It's a great little help to start your terminal coding career oath.

Typology: Cheat Sheet

2022/2023

Uploaded on 04/23/2024

rachel-burns-1
rachel-burns-1 🇺🇸

1 / 7

Toggle sidebar

Partial preview of the text

Download kali Linux cheat sheet and more Cheat Sheet Computer science in PDF only on Docsity! File commands 1 File commands Here are some commonly used commands for Linux file and directory operations, classified according to their functionalities: Navigating and viewing directories: ls : List directory contents cd : Change the current working directory pwd : Show the full path of the current working directory tree : Display directory content in a tree-like structure cat : View file content more or less : View file content one page at a time Managing files and directories: touch : Create new files or update file access and modification times mkdir : Create new directories Viewing file and directory attributes: ls (with different options): View detailed information about files and directories file : Determine the file type stat : Display detailed properties of files and directories du : Display disk usage of files and directories df : Display disk usage of file systems Compressing and decompressing files: tar : Create archive files or extract files from archives gzip : Compress files File commands 2 cp : Copy files and directories mv : Move or rename files and directories rm : Delete files and directories ln : Create links or shortcuts chmod : Modify file and directory permissions chown : Change file and directory owner chgrp : Change file and directory group gunzip : Decompress files zip : Create ZIP archive files or extract files from ZIP archives unzip : Decompress ZIP archive files Searching for files and directories: find : Search for files and directories in a specified directory grep : Search for specified patterns or text in files locate : Quickly find files using a database (requires updating the database) whereis : Show the location of binary files, source files, and help files which : Display the full path of a specified command These are just some of the commonly used Linux commands for file and directory operations, categorized based on their functionalities. There are many more commands and options available for different scenarios and requirements. You can refer to relevant documentation to learn more about the usage and options of each command. cheat sheet File commands 5 Linux file system Directory Description Example /bin Essential user binaries (commands) /bin/ls , /bin/cp , /bin/mkdir /boot Boot loader files and kernel images /boot/vmlinuz , /boot/initrd.img /dev Device files for hardware devices /dev/sda , /dev/tty , /dev/null /etc System configuration files and directories /etc/passwd , /etc/hosts , /etc/ssh /home Home directories for regular users /home/user1 , /home/user2 /lib Shared libraries needed by system binaries /lib/libc.so.6 , /lib64/ld-linux-x86- 64.so.2 /media Mount point for removable media devices /media/usb , /media/cdrom /mnt Temporary mount point for other file systems /mnt/external , /mnt/iso /opt Optional application software packages /opt/java , /opt/apache /proc Virtual file system containing kernel and process information /proc/cpuinfo , /proc/meminfo /root Home directory for the root user /root/.bashrc , /root/.profile /run Run-time data for processes (e.g., PID files, sockets) /run/lock , /run/user/1000 /sbin Essential system binaries (usually for system administration tasks) /sbin/ifconfig , /sbin/reboot /srv Data for services provided by the system /srv/www , /srv/ftp /tmp Temporary files /tmp/tempfile , /tmp/socket /usr User-related programs and data, including user/binaries, libraries, and documentation /usr/bin/gcc , /usr/share/man /var Variable data, such as log files, spool files, and temporary files /var/log/syslog , /var/spool/mail File commands 6 File permission in Linux file permissions are represented using a 10-character string that consists of three sets of permissions for the owner, group, and others, respectively. The format is as follows: - rwxrwxrwx Here's what each part of the string means: The first character indicates the type of the file: - for a regular file, d for a directory, l for a symbolic link, and so on. The next three characters ( rwx ) represent the read, write, and execute permissions for the file's owner. The next three characters ( rwx ) represent the read, write, and execute permissions for the group that the file belongs to. The last three characters ( rwx ) represent the read, write, and execute permissions for others, i.e., users who are neither the owner nor part of the group. Permission Symbol Description Read r The ability to read the contents of a file or view the contents of a directory Write w The ability to modify the contents of a file or create, rename, or delete files within a directory Execute x The ability to execute a file or enter a directory File permission examples: Permission Owner Group Others 777 rwx rwx rwx 755 rwx r-x r-x 644 rw- r– r– Directory permission examples: Permission Owner Group Others 777 rwx rwx rwx File commands 7 755 rwx r-x r-x
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved