mac settings allow any source software to runsudo spctl--master-disable
open a file or directory in a terminalOpen Terminal Finderopen Test.txt Open the Test.txt file under the current path
Historical CommandHistory View Historical Command history-c Delete history commandswitch to root usersudo su-sudo-i
to define an alias for a commandAlias alias Cls=clear Note Do not have a space unalias remove the definition of an alias Unalias CLS
hide and show Mac filescommand to display Mac hidden files: Defaults write Com.apple.finder appleshowallfiles-bool true to hide Mac hidden files command: Defaults write Com.apple.finder Appleshowallfiles-bool falseneed to restart your computer
mac Memory Releasesudo purge
File Searchsudo find/-name Java Query Java directory path
Add shortcut commandsudo ln-s/users/apple/downloads/rar/rar/usr/local/bin add rar shortcut command to/usr/local/binView software PathsWhich Java view Java installation directory path
command to display the folder or file size under the current directoryDU-HS * or DU-SHC *
Switch to ShellChsh-s/bin/bash in Linux used to use the LL, LA, l and other LS alias child shoes to Mac OS can be depressed ~ ~ In fact, as long as the user directory to create a script ". Bash_profile", and enter the following: Alias ll= ' ls- AlF ' Alias la= ' ls-a ' Alias l= ' LS-CF ' then source. bash_profile
Compression and decompressionUnzin text.zip TAR-XVF Rarosx-5.0.1.tar//Unzip tar file
Permissions Configurationsudo chmod-r 755 xxxchmod 777 files.sh Modify permissions for 777chown-r Wang.users/his to change the directory/his and all files and subdirectories under it to Wang, belonging to the group changed to users. sudo chown-r $USER/library/caches//give current directory permission
Environment Variablesecho $PATH environment variable view export path= $PATH:/users/nick/node_modules/stylus/bin
mac Tips1)/etc/paths (global recommended modification of this file) edit paths, add environment variable to paths file, one line a path hint: When entering environment variable, do not enter one by one, just drag folder to Terminal. 2)/etc/profile (recommended not to modify this file) global (public) configuration, regardless of which user, the file will be read when logged in. 3)/ETC/BASHRC (typically adds a system-level environment variable to this file) global (public) configuration, which is read by the bash shell, regardless of the way it is executed. Brew Install Archey installation hold command mouse click the app icon in the dock to open the app path
Mac System Informationmit-nick:~ nick$ Archey # # # User:nick # # # # Hostname:mit-nick X 10.12.4 ####### ####### kernel:darwin ###################### uptime:21:23 ##################### Shell:/ Bin/zsh #################### terminal:xterm-256color Apple Terminal #################### cpu:intel Core I5-4278U C PU @ 2.60GHz ##################### memory:8 GB ###################### disk:62% #################### Battery: 100% ################ IP address:61.152.132.170 # # # # #####
Mac Common Command Daquan