-
Notifications
You must be signed in to change notification settings - Fork 2
/
Terminal.txt
120 lines (77 loc) · 1.55 KB
/
Terminal.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
CTRL+Alt+t
http://angrytools.com/command/
General
$ sudo -s
become root
$ exit
stop being root or quit terminal
become sudo?
else?
$ history
show terminal command history
Find directories and files
$ ls
get the list of files and directory
$ pwd
display current directory
Path navigation
$ cd /
move to root directory, now present directory become /
$ cd
move to user directory
$ cd ..
move to one directory up
$ cd -
move to previous directory
Create files
$ touch filename.txt
create new empty file
$ > filename.txt
create new empty file
$ cat filename.txt
view file contents
Create directories
$ mkdir foldername
create a new directory
$ sudo mkdir foldername
create a new directory with super user rights
Move files
$ mv filename.txt toDir/
move file into specified folder
$ cp filename.txt toDir/
copy file into specified folder
Delete directory
$ rmdir /tmp/dirname
delete directory inside tmp directory
$ rm dirname
another command to remove directory
Delete file
$ del file.txt
delete file
Time
$ date
show current date/time
System information
$ sudo lshw
get details of system hardware
$ sudo df -h
nfo about hard disk usage
User info
$ who
show who is logged in
Running process
$ ps
show running process
$ ps aux
show running process with details
Shudown/restart
$ sudo poweroff
$ sudo shutdown -h now
$ sudo init 0
use any command to shutdown system
$ sudo reboot
$ sudo shutdown -r 0
$ sudo init 6
use anyone command to restart
$ gnome-session-quit --logout
logout