进入linux系统,在桌面单击右键打开终端,先root,即输入 :
sudo su
接着输入密码,完成root
1.安装
我从师兄那里拷过来的MATLAB就是一个ISO包,所以跟着别人的教程捣鼓了半天才意识到:我跟他们的教程里一开始的步骤应该是不一样,我这个能直接在linux系统上挂载(双击)
打开终端,输入:
cd /media/k/MATHWORKS_R2012A
其实cd之后的就是你挂载的ISO的路径,这是我的路径,可以根据自己的情况替换 cd 后的路径进入该目录
继续输入:
ls
ls是列出当前目录下的所有文件,这里会看到 install
接下来继续输入:
cd ..
意为返回上一层
输入:
sudo /media/k/MATHWORKS_R2012A/install
这时候就开始执行安装文件了
这一部分参考:https://blog.csdn.net/minione_2016/article/details/53313271
默认的安装路径是 /usr/local/,因为我对linux系统不熟,没注意到这个问题,更别说更改安装路径。
在安装过程中一定要记得自己的安装的路径(比如我的就是 /usr/local/MATLAB/R2012a,如果是首次安装,系统会提示没有该文件夹询问你是否要建立一个新的,选择YES就可以了)
选择Use a File Installation Key - Next
出现一个需要输入序列号的框,序列号在 /MATHWORKS_R2012A/crack/install.txt 里查看(如下)
之后点NEXT就行了
2. 破解
把 /media/k/MATHWORKS_R2012A/bin/路径下的glnxa64这个文件复制到安装路径/usr/local/MATLAB/R2012A/下的bin文件夹中
在终端输入:
sudo cp /media/k/MATHWORKS_R2012A/bin/glnxa64/* /usr/local/MATLAB/R2012A/bin/glnxa64/
cp是复制的意思
接下来启动MATLAB,输入:
cd /usr/local/MATLAB/R2012a/bin/
./matlab
选择”在不使用Internet的情况下手动激活”,点“下一步”
选择破解文件,后缀名是.dat(有的是.lic文件),这个图中的就是license就是.lic选择这个文件,点击“下一步”就可以完成
sudo cp /media/k/MATHWORKS_R2012A/crack/* /usr/local/MATLAB/R2012a/
复制完成,到时候直接到这个路径下选择破解文件就好了
参考:https://blog.csdn.net/weibo1230123/article/details/77949482
如果找不到有效的license,比如我的license文件到期时间就是2016年双11,忘了从哪儿看的——急着用的话可以直接改一下系统时间,再直接选中/usr/local/MATLAB/R2012a/license里的.lic文件(或者是crack里面的standalone.dat)就能用起来。
——但是,我的电脑改了时间以后,浏览器上不了网了……报告和网络时间不符合,吐血……
所以还是不用这招,可以进入 /usr/local/MATLAB/R2012a/liscenses 打开.lic文件,把里面的代码全部替换为:(注意要有root权限之后输入nautilus,才能开始更改)
INCREMENT Aerospace_Blockset MLM 99 permanent uncounted \
A05070F00D1EB1F92326 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=216 SN=888888 TS_OK
INCREMENT Aerospace_Toolbox MLM 99 permanent uncounted \
6090F0C08395D4289512 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=237 SN=888888 TS_OK
INCREMENT Bioinformatics_Toolbox MLM 99 permanent uncounted \
40E0B0406DE56D23A426 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=190 SN=888888 TS_OK
INCREMENT Cert_Kit_IEC MLM 99 permanent uncounted \
9080309041D2DCCB2B10 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=179 SN=888888 TS_OK
INCREMENT Communication_Blocks MLM 99 permanent uncounted \
80E010304ACCEEB5E0AA VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=77 SN=888888 TS_OK
INCREMENT Communication_Toolbox MLM 99 permanent uncounted \
C0003000770A1A086530 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=162 SN=888888 TS_OK
INCREMENT Compiler MLM 99 permanent uncounted 60D0C0F0DC03C2F72FF7 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=232 SN=888888 TS_OK
INCREMENT Control_Toolbox MLM 99 permanent uncounted \
6020E0B00B7ECE0893BB VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=7 \
SN=888888 TS_OK
INCREMENT Curve_Fitting_Toolbox MLM 99 permanent uncounted \
10703080061FF9DA5A81 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=229 SN=888888 TS_OK
INCREMENT Data_Acq_Toolbox MLM 99 permanent uncounted \
E0B0E0E05124CF4A1A8D VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=21 SN=888888 TS_OK
INCREMENT Database_Toolbox MLM 99 permanent uncounted \
0010D0B02CA7353F8314 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=230 SN=888888 TS_OK
INCREMENT Datafeed_Toolbox MLM 99 permanent uncounted \
40905060D1ECD939538F VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=185 SN=888888 TS_OK
INCREMENT Dial_and_Gauge_Blocks MLM 99 permanent uncounted \
A0F05070AA9AEBF40588 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=226 SN=888888 TS_OK
INCREMENT Distrib_Computing_Toolbox MLM 99 permanent uncounted \
5000D00031D2C6B89F9C VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=229 SN=888888 TS_OK
INCREMENT EDA_Simulator_Link MLM 99 permanent uncounted \
E070C0C02B4B90B5A8D0 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=205 SN=888888 TS_OK
INCREMENT Econometrics_Toolbox MLM 99 permanent uncounted \
505010F00EB1289A73BA VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=149 SN=888888 TS_OK
INCREMENT Embedded_IDE_Link MLM 99 permanent uncounted \
90E01090A9BDA4FF67D7 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=254 SN=888888 TS_OK
INCREMENT Excel_Link MLM 99 permanent uncounted E0800080FED6DF10E43F \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=207 SN=888888 TS_OK
INCREMENT Filter_Design_HDL_Coder MLM 99 permanent uncounted \
3050B02039903259577E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=181 SN=888888 TS_OK
INCREMENT Filter_Design_Toolbox MLM 99 permanent uncounted \
3000E0B02C875CDF5823 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=239 SN=888888 TS_OK
INCREMENT Fin_Derivatives_Toolbox MLM 99 permanent uncounted \
70A010D017A8FA7CE955 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=247 SN=888888 TS_OK
INCREMENT Financial_Toolbox MLM 99 permanent uncounted \
20E050A0ACC6A69E7AEE VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=241 SN=888888 TS_OK
INCREMENT Fixed-Point_Blocks MLM 99 permanent uncounted \
E0206040ED6EF9BCCB3B VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=11 SN=888888 TS_OK
INCREMENT Fixed_Income_Toolbox MLM 99 permanent uncounted \
50E090D0C130F6416176 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=132 SN=888888 TS_OK
INCREMENT Fixed_Point_Toolbox MLM 99 permanent uncounted \
C07000703494010EF55C VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=154 SN=888888 TS_OK
INCREMENT Fuzzy_Toolbox MLM 99 permanent uncounted \
D04010B048FB8D350E4E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=233 SN=888888 TS_OK
INCREMENT GADS_Toolbox MLM 99 permanent uncounted \
50D0900087384B51643A VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=210 SN=888888 TS_OK
INCREMENT Identification_Toolbox MLM 99 permanent uncounted \
00707080A0CC0D8FB71E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=190 SN=888888 TS_OK
INCREMENT Image_Acquisition_Toolbox MLM 99 permanent uncounted \
50D0D0905C22130C4D2A VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=208 SN=888888 TS_OK
INCREMENT Image_Toolbox MLM 99 permanent uncounted \
B01030E0F517B496275C VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=133 SN=888888 TS_OK
INCREMENT Instr_Control_Toolbox MLM 99 permanent uncounted \
80C0505033C162F3017F VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=169 SN=888888 TS_OK
INCREMENT MAP_Toolbox MLM 99 permanent uncounted C090E0E022BD3BA852B3 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=4 SN=888888 TS_OK
INCREMENT MATLAB_Report_Gen MLM 99 permanent uncounted \
80B000B00052F620FB11 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=190 SN=888888 TS_OK
INCREMENT MATLAB_Distrib_Comp_Engine MLM 99 permanent uncounted \
804080300CB545FBECE8 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=233 SN=888888 TS_OK
INCREMENT MATLAB_Builder_for_Java MLM 99 permanent uncounted \
404040707C2CA5639DEE VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=186 SN=888888 TS_OK
INCREMENT MATLAB_Builder_for_dot_Net MLM 99 permanent uncounted \
8070E0D0FFAA645DA39D VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=255 SN=888888 TS_OK
INCREMENT MATLAB MLM 99 permanent uncounted 50E0F0D08F6CEF24CC5B \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=14 SN=888888 TS_OK
INCREMENT MATLAB_Excel_Builder MLM 99 permanent uncounted \
50106010BCBF479623D9 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=206 SN=888888 TS_OK
INCREMENT MBC_Toolbox MLM 99 permanent uncounted B05000C02F157C5BEE28 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=198 SN=888888 TS_OK
INCREMENT MPC_Toolbox MLM 99 permanent uncounted 3050206087BF1C33045E \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=203 SN=888888 TS_OK
INCREMENT Neural_Network_Toolbox MLM 99 permanent uncounted \
D0009010451EEB5A283F VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=198 SN=888888 TS_OK
INCREMENT OPC_Toolbox MLM 99 permanent uncounted 50F070404BE7E269740A \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=198 SN=888888 TS_OK
INCREMENT Optimization_Toolbox MLM 99 permanent uncounted \
E0F00030546D043DF202 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=152 SN=888888 TS_OK
INCREMENT PDE_Toolbox MLM 99 permanent uncounted 5080705081D393548E6E \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=166 SN=888888 TS_OK
INCREMENT Power_System_Blocks MLM 99 permanent uncounted \
90405000B77AC9D2CBB9 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=216 SN=888888 TS_OK
INCREMENT Qual_Kit_DO MLM 99 permanent uncounted D01010C04E05A80BCD10 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=190 SN=888888 TS_OK
INCREMENT RF_Blockset MLM 99 permanent uncounted A0A00020B1FED5C15465 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=201 SN=888888 TS_OK
INCREMENT RF_Toolbox MLM 99 permanent uncounted 90F0905068868B4A97C8 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=168 SN=888888 TS_OK
INCREMENT RTW_Embedded_Coder MLM 99 permanent uncounted \
A0D0E0C0B3978D64A1A3 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=250 SN=888888 TS_OK
INCREMENT Real-Time_Win_Target MLM 99 permanent uncounted \
300060D0E68A928A0DBC VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=208 SN=888888 TS_OK
INCREMENT Real-Time_Workshop MLM 99 permanent uncounted \
7020D04006040066FAEA VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=134 SN=888888 TS_OK
INCREMENT Robust_Toolbox MLM 99 permanent uncounted \
1040201098A2D1E80D25 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=173 SN=888888 TS_OK
INCREMENT SIMULINK MLM 99 permanent uncounted 30D05030E2F9BBB8FCC2 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=213 SN=888888 TS_OK
INCREMENT SIMULINK_Report_Gen MLM 99 permanent uncounted \
E070B070769E869B6A03 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=206 SN=888888 TS_OK
INCREMENT SL_Verification_Validation MLM 99 permanent uncounted \
C0309000FB238CC772CC VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=251 SN=888888 TS_OK
INCREMENT Signal_Blocks MLM 99 permanent uncounted \
F000A0702665C46E07FF VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=196 SN=888888 TS_OK
INCREMENT Signal_Toolbox MLM 99 permanent uncounted \
E070B0403768324D14C1 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=185 SN=888888 TS_OK
INCREMENT SimBiology MLM 99 permanent uncounted 404080202CFCE52296A3 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=187 SN=888888 TS_OK
INCREMENT SimDriveline MLM 99 permanent uncounted \
B030A0704195F94612EF VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=163 SN=888888 TS_OK
INCREMENT SimElectronics MLM 99 permanent uncounted \
F0D050A035E4883B1E9D VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=246 SN=888888 TS_OK
INCREMENT SimEvents MLM 99 permanent uncounted 30E02040EB0C922C71A0 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=216 SN=888888 TS_OK
INCREMENT SimHydraulics MLM 99 permanent uncounted \
C07090B0F394787D61B7 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=185 SN=888888 TS_OK
INCREMENT SimMechanics MLM 99 permanent uncounted \
909000103231C13BB4BB VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=148 SN=888888 TS_OK
INCREMENT Simscape MLM 99 permanent uncounted 8020D0906FAC13D095EC \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=211 SN=888888 TS_OK
INCREMENT Simulink_Control_Design MLM 99 permanent uncounted \
D09060704E819BCDDD32 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=206 SN=888888 TS_OK
INCREMENT Simulink_Design_Optim MLM 99 permanent uncounted \
6020C080F9B2D2F92E1C VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=243 SN=888888 TS_OK
INCREMENT Simulink_Design_Verifier MLM 99 permanent uncounted \
8080D0002C390CBB546E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=196 SN=888888 TS_OK
INCREMENT Simulink_HDL_Coder MLM 99 permanent uncounted \
F05000C0108BB935AD39 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=215 SN=888888 TS_OK
INCREMENT Simulink_PLC_Coder MLM 99 permanent uncounted \
803090F0C42068269D45 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=194 SN=888888 TS_OK
INCREMENT Spline_Toolbox MLM 99 permanent uncounted \
30E0B0A014330227515B VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=112 SN=888888 TS_OK
INCREMENT Stateflow_Coder MLM 99 permanent uncounted \
2050D0B06F85F87E216B VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=199 SN=888888 TS_OK
INCREMENT Stateflow MLM 99 permanent uncounted 4030C0C01E0B917BED3F \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=223 SN=888888 TS_OK
INCREMENT Statistics_Toolbox MLM 99 permanent uncounted \
7010C05033AC51015B7C VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=178 SN=888888 TS_OK
INCREMENT Symbolic_Toolbox MLM 99 permanent uncounted \
80D09090A1ADD082F35D VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=33 SN=888888 TS_OK
INCREMENT SystemTest MLM 99 permanent uncounted B0A0A0E039DA5A2F4AA0 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=29 SN=888888 TS_OK
INCREMENT Target_Support_Package MLM 99 permanent uncounted \
207000609E1847CC5A6E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=172 SN=888888 TS_OK
INCREMENT Vehicle_Network_Toolbox MLM 99 permanent uncounted \
00C02010ABF2A8B8152B VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=11 SN=888888 TS_OK
INCREMENT Video_and_Image_Blockset MLM 99 permanent uncounted \
107070B0AF7901361B1E VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=162 SN=888888 TS_OK
INCREMENT Virtual_Reality_Toolbox MLM 99 permanent uncounted \
B010002042F6C767442D VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=205 SN=888888 TS_OK
INCREMENT Wavelet_Toolbox MLM 99 permanent uncounted \
30C0F0800F9B41DD8577 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=238 SN=888888 TS_OK
INCREMENT XPC_Embedded_Option MLM 99 permanent uncounted \
102000905C51C5DE4BF0 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=174 SN=888888 TS_OK
INCREMENT XPC_Target MLM 99 permanent uncounted 6090B0000421BEBA6810 \
VENDOR_STRING=QQ=47399897 HOSTID=ANY ck=136 SN=888888 TS_OK
INCREMENT Sensor_Array_Toolbox MLM 99 permanent uncounted \
E0008030D7E6251042F1 VENDOR_STRING=QQ=47399897 HOSTID=ANY \
ck=179 SN=888888 TS_OK
保存即可,这个.lic文件就可以用了。
参考:https://blog.csdn.net/qq_28713863/article/details/78518450
最原始地址:http://blog.sina.com.cn/s/blog_4a46812b0102x694.html
尝试启动破解后的matlab 使用命令
./matlab
3. 现状
现在我每次开电脑,要在终端输入
sudo su
输入密码后,找到路径:
cd /usr/local/MATLAB/R2012A/bin/
./matlab
就打开MATLAB2012a了。
4. 懒
如果要设置用更少的语句直接打开matlab,好像还要设置环境变量,以及有些人建议设置桌面图标,不过我现在没啥时间了……装好了赶紧跑数据,闲下来再琢磨吧……能用就行……
貌似因为我是在root权限下做的一系列的安装,现在要更改/usr/local/MATLAB/R2012a/下的所有文件都要先获取root权限。有点麻烦,不过同样的……现在没啥时间了……装好了赶紧跑数据,闲下来再琢磨吧……能用就行能用就行……
5.可能会有也可能不会有的后续
关于设置桌面图标和设置全局变量的教程,摘抄一点下来,等哪天不懒了去弄一下:
创建桌面图标
1、 在/usr/share/applications/下创建桌面图标文件:Matlab.desktop(避免你进入目录错误,你可以留意一下,这个文件夹中有很多程序的桌面图标文件×××.desktop)
2、 百度下载一个图标文件,名字命为Matlab.png,放到/usr/local/MATLAB/目录下,编辑Matlab.desktop文件,添加以下内容
[Desktop Entry]
Type=Application
Name=Matlab
GenericName=Matlab 2012A
Comment=Matlab:The Language of Technical Computing
Exec=sh /usr/local/MATLAB/R2012A/bin/matlab
con=/usr/local/MATLAB/Matlab.png
Terminal=false
StartupNotify=true
Categories=Development;Applications;Matlab;
**
3、 保存退出,桌面图标创建OK!
最后一步—->启动
启动之前将matlab的安装文件夹添加到环境变量中,分别修改/ect/profile/文件和用户的~目录下的.bashrc文件,在这两个文件末尾添加上 export PATH=”$PATH:/usr/local/MATLAB/R2012A/bin”
使用命令:source ~/,bashrc 来更新环境变量
现在在终端里输入matlab就可以启动matlab