-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArchLinux Notes.txt
More file actions
executable file
·241 lines (212 loc) · 12.5 KB
/
ArchLinux Notes.txt
File metadata and controls
executable file
·241 lines (212 loc) · 12.5 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
## ##### #
#### ## ## #
## ## ##### #
###### ## ##
## ## ## ##
-----------------------------------------------------------------------------------------
Special notes packages, softwares to install and configurations to make on Arch Linux
-----------------------------------------------------------------------------------------
* to downgrade a package
- go to 'var/cache/pacman/pkg' and find the version of the package u want to downgrade
- pacman -U /var/cache/pacman/pkg/<package_full_name>.tar.xz
* to remove a package
- This removes the package and its dependecies that no other package uses
# pacman -Rs <package_name>
* to check or search for a package in local system
- pacman -Qs <package_name>
* to extract to specific folder
- unzip <file_name> -d <folder_name>
* install neofetch to get info abt system
- neofetch
* to check your public ip address use the following website
- www.ipleak.org
* setting up VPN on Archlinux
- go to <www.protonvpn.com> and setup an account
- install <openvpn>, <dialog>, <python-pip>, <python-setuptools> (you will mostly have them already installed)
# use pacman to install them
- install the <protonvpn-cli> using pip
# sudo pip3 install protonvpn-cli
- initialize your protonvpn and connect to it
# sudo protonvpn init
$ here when asked for <Protonvpn Openvpn> username and password get this from your protonvpn account
% go to the accounts tab and there should be an openvpn credential
$ use the free service
$ use <UDP> cuz its faster, but as you know <TCP> is more reliable
# connect to the initialized protonvpn
$ sudo protonvpn c (select and connect to a vpn out of 3 countries)
% there are only 3 countries to choose from in the free plan
$ sudo protonvpn c -f (connect to the fastest server)
% this command didn't work for you at the time of writing this note
$ sudo protonvpn r (reconnect to the last vpn loaction you connected to)
% in this case you don't have to choose anything, it'll use your last configuration and choice
# disconnect from the vpn
$ sudo protonvpn d
* install <scrcpy> for Andriod phone screen mirroring
- <scrcpy> is the short hand representation of <Screen Copy>
- its found in the <AUR>
- to run it, type <scrcpy> in the terminal
# make sure the andriod phone is connected first
* install <obs-studio> for screen recording
- it has so many awesome features
- don't forget to add audio and screen sources when trying to record (add is simple and straight forward)
* install <genymotion> to simulate andriod device on your pc
- this is a commercial app, but it has a free edition for personal use
- download and install it from <AUR>
- it needs virtualBox to be installed, if its not, then it will be installed
- if you are getting errors like <virtualBox error: host only error>, something like this then use tht following solutions:
# install virtualBox and packages related to it
$ sudo pacman -S virtualbox virtualbox-guest-iso virtualbox-host-dkms
# if the above doesn't work, then try reloading the vmBox
$ sudo vboxreload
# is the above command instead gives additional error like "directory doesn't exist", then install the following package
$ sudo pacman -S virtualbox-host-modules-arch
$ the above package will ask to overwrite another package if there is conflict, in such case allow it
$ once again reload vmBox with <vboxreload> command
# if you still can't run <genymotion> after the above fixes, then update or install linux-headers and linux
$ sudo pacman -S linux linux-headers
$ once again reboot vmBox
# if none of the above steps solves the problem, then research the web for a solution regarding your specific error
* to remove unused dependecies (packages) from arch system, use the following commands
- pacman -Qdt (lists unused dependecies)
- pacman -Rsn $(pacman -Qdtq) (removes unused dependencies | need super user privilage)
* to remove cached package install files use the following commands
- paccache -r (removes all cached versions of installed and uninstalled packages except for the recent 3 versions | need sudo)
- paccache -rk1 (removed all cached versions except for the one past latest version | the last number can be manipulated as needed)
- paccache -ruk0 (the <u> flag means to remove uninstalled packages' caches | this command removes all cached versions of uninstalled packages only)
- pacman -Sc (to remove all the cached packages that are not currently installed, and the unused sync database | need sudo)
- pacman -Scc (To remove all files from the cache | need sudo | don't use this unless you desperatly need disk space)
* to remove packages in yay cache
- yay -Sc (to remove cached packages that are not currenly installed)
- yay -Scc (to remove all cached pacakegs, both official and AUR)
- yay -Yc (clean unneeded packages)
* setup hotspot for wifi-sharing
- check if the PC has compatible wireless device
# iw list (command, need to install <iw> package first)
- install <linux-wifi-hotspot> package from AUR
- use terminal command to initialize hotspot
# create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
* extract rar files
- install <unrar> package using pacman
- use the following command to extract
# unrar e <file.rar> or
# unrar e <file.rar> <directory-to-extract-to>
* use <ncdu> package to check which files are taking disk space
- pacman -S ncdu
- run <ncdu> on terminal to begin the process
# ncdu (to scan home directory)
# ncdu <dir_name> (to scan a specific directory)
% ncdu Downloads/
# sudo ncdu -x / (to scan entire root file system)
- keys to use after result is displayed
# i (display detail of directory, press the same key to return)
# right_arrow, left_arrow (display the content of a dir & go back to upper directory from content)
* how to make android device appear on window manager
- update system ( pacman -Syu, need root privilage )
- install git (official)
- install mtpfs (official)
- install jmtpfs (AUR)
- install gvfs-mtp (offcial)
# pacman -Sy gvfs-mtp (NRP)
- install gvfs-gphoto2 (official)
# pacman -Sy gvfs-gphoto2 (NRP)
- reboot
* to format a usb disk use the following commands
- first check the usb device mount point
# lsblk
# (or) fdisk -l (NRP)
- unmount the usb disk in order to format it
# umount <disk mount point> (NRP)
- to format the disk with fat32 use the following command
# mkfs.vfat -n '<name>' <mount_point> (NRP)
- to format the disk with ntfs use the following command
# mkfs.ntfs <mount_point (NRP)
- after formating a drive just unmount the usb drive before using it again
* to exract rar file with its original directory structure, use the following command
- unrar x <file.rar> <exract_to_directory>
* to list files inside a rar file without extracting it, use the following command
- unrar l <file.rar>
* install anaconda
- install anaconda pakage from AUR using yay
- add anaconda to path
# open <~/.bashrc> as root using nano editor
# append the following to the last line
% <export PATH=$PATH:/opt/anaconda/bin>
# restart terminal
- to start navigator run the following command
# anaconda-navigator
- to prevent anaconda from starting the <base> enviroment at terminal startup run the following command
# conda config --set auto_activate_base false
# the problem with starting the <base> enviroment is that it sometimes messes with the default bash commands
* install <Intel Skylake GT2 [HD Graphics 520]> GPU tool called <intel-gpu-tools>
- pacman -S intel-gpu-tools (NRP)
- to get a top like overview of the current gpu usage, run the following command
# intel_gpu_top (NRP)
* check terminal emoji and unicode support with the following commands and links
- curl https://unicode.org/Public/emoji/13.0/emoji-test.txt | less (used to check emoji support)
# the <less> pipelined command is used to view the output step by step instead of spilling everything at once
- curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt (used to check unicode support)
* to update the database of mlocate package, use the following command
- updatedb (NRP)
* how to install hp printer driver
- install cups (offical repo)
- enable & start cups
# systemctl enable --now cups (NRP)
# systemctl start cups (NRP)
- install hplip (official repo)
- install driver plug-in
# hp-setup -i (NRP)
- install system-config-printer for GUI tool to configure printers (official repo)
* how to add mason libraries to system
1] download and extract <mason.zip> file from official website | or clone the git repo
# https://cs.gmu.edu/~eclab/projects/mason/#Download <official site>
# https://github.com/eclab/mason <official git repo>
2] download <mason.20.jar> jar file from official site
3] download and extract other libraries which allow MASON to generate movies, charts, PDF files, etc.
# <libraries.zip>
4] add extracted folder from <step-1> to the following directory path and name of <mason>
# /usr/share/
5] add the jar file from <step-2> to the following directory
# /usr/share/java/mason/
% create the mason folder
6] add the jars from the extracted folder from <step-3> to the following directory
# /usr/share/java/mason/
7] install Java3D to use Mason in 3D
a) get the required libraries for java3D and the zip files
% https://cs.gmu.edu/~eclab/projects/mason/j3dlibs.zip
b) add the jars from the extracted zip file in <step-7a> to the following directory
% /usr/share/java/java3D/
$ create the <java3D> folder
8] add all the added libraries so far to the java class path
# edit <~/.bashrc> file and add the following lines
% <code-start>
# add mason to classpath
export CLASSPATH=$CLASSPATH:/usr/share/mason
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/bsh-2.0b4.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/itext-1.2.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/jcommon-1.0.21.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/jfreechart-1.0.17.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/jmf.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/portfolio.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/mason/mason.20.jar
# add java3D to classpath
export CLASSPATH=$CLASSPATH:/usr/share/jogamp-all-platforms
export CLASSPATH=$CLASSPATH:/usr/share/java/java3D/j3dcore.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/java3D/j3dutils.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/java3D/vecmath.jar
export CLASSPATH=$CLASSPATH:/usr/share/java/java3D/jogamp-fat.jar
% <code-end>
9] inorder to run mason code from Intellij IDE, you need to add the above libraries to the project library
# select project -> File -> Project Structure -> Libraries
# click on plus (add) button
# select Java
# find and select directories in step-4,5,7
# click on apply and ok
* install a note taking tool <Notion>
# from AUR by the name <notion-app>
# create an online account first and then login and authenticate the desktop app
* install netlogo for Multi-agent project
# from AUR by the name <netlogo>
* command to position multiple monitors using xrandr
# (cmd) xrandr --output eDP1 --auto --pos 1925x925 --output DP1 --auto --pos 0x775 --output HDMI1 --auto --pos 300x0
# the figures after the --pos flag are pixels from the top left corner
# the label of the output monitors can be retrived by simply typing the <xrandr> command on its own