-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinux-basic.txt
85 lines (53 loc) · 2.82 KB
/
linux-basic.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# MUST KNOW COMMANDS:
- 1- cd directory-name -> change the directory
- 2- pwd -> show where your current location is
- 3- ls | ls directory-name -> show the list of files and folders in directory
- 4- cp origin-file|folder-name destination-directory-name -> copy files|folders in destination
directory
- 5- mv origin-file|folder-name destination-directory-name -> move files|folders in destination
directory
- 6- rm directory-name -> remove a file|folder in directory
- 7- cat file-name -> show the content of a file
- 8- mkdire directory-name -> make a new directory
- 9- touch file-name -> create a new file
- 10- chmod permission-type file-name -> changeing permission of a file
- 11- grep direcroty-name -> search in a directory
- 12- man -> for learning more about a command
- 13- echo -> like print in python
- 14- whoami -> show the current user
# file-system structure:
- 1- / (root filesystem)
The root filesystem is the top-level directory of the filesystem. It must contain all of the files required
to boot the Linux system before other filesystems are mounted. It must include all of the required executables
and libraries required to boot the remaining filesystems. After the system is booted, all other filesystems are
mounted on standard, well-defined mount points as subdirectories of the root filesystem.
- 2- /bin
This is where the executable files are located. These files are available to all users
- 3- /dev
These are device drivers
- 4- /etc
Supervisor directory commands, configuration files, disk configuration files, valid user lists, groups, ethernet, hosts, where to send critical messages
- 5- /lib
Contains shared library files and sometimes other kernel-related files
- 6- /boot
Contains files for booting the system
- 7- /home
Contains the home directory for users and other accounts
- 8- /mnt
Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively
- 9- /proc
Contains all processes marked as a file by process number or other information that is dynamic to the system
- 10- /tmp
Holds temporary files used between system boots
- 11- /usr
Used for miscellaneous purposes, and can be used by many users. Includes administrative commands, shared files, library files, and others
- 12- /var
Typically contains variable-length files such as log and print files and any other type of file that may contain a variable amount of data
- 13- /sbin
Contains binary (executable) files, usually for system administration. For example, fdisk and ifconfig utlities
- 14- /opt
Optional files such as vendor supplied application programs should be located here.
- 15- /media
A place to mount external removable media devices such as USB thumb drives that may be connected to the host.
- 16- /kernel
Contains kernel files