Until a class or so , Microsoft seems to be headed in the right direction . First , the inclusion of Linux Subsystem in the DOS Command Line . Next , transferringMicrosoft Edgeto Chromium and lately , Your Phone Companionapp is seeing huge upgrade to increase Android compatibility . The late good word has been the “ young Windows Terminal ” . The developer frame is useable to download through theMicrosoft Store . The pleasing affair about this is it can run Windows , Powershell , and Unix commands under one console table .
But , with all these consuming additions what are the Unix command you should really hump ? So , here are the most essential command to utilize with the new Windows terminal .
The new Windows Terminal is different from the Windows Subsystem for Linux and Ubuntu Virtual Machine .
What’s new with the Windows Terminal
The fresh Windows terminal has the be rising slope
Unix Commands to use with the new Windows terminal
You have to switch to Ubuntu to carry all of these commands . instead , you’re able to also type“bash”and get to the Unix Shell from the Powershell and cmd windowpane as well .
1. cat & vi
Windows cmdlet does n’t lease you edit or view the text edition file within the end itself . Now with the newfangled terminal , you could habituate the commandcatorvito sight or edit the file within the terminus . The unexampled terminal supports all the Unix aboriginal text editor such as nano , vi , muscularity or ed .
Example : bozo abc.txt
2. cp or mv
Just like the Windows aboriginal transcript and move command , you also have ‘ cp ’ and ‘ mv ’ in the Unix depot . The only major difference is that cp and mv back up much more permutation than the aboriginal Windows commands . For example , you may make hard links and subdued links of file with these commands . In case you do n’t know , gentle linkup are cursor which redirect the contentedness of the original file whereas hard link is a mirror written matter of the original Indian file . Soft links can not exist without the original data file whereas hard link can still present data .
Example : cp -sv /root / temp / photos /root / current / pic
3. tar
Windows lets you zip the file via statement line but it can not deal tars or bzip . With Unix , you get a native command blood public utility company call tar which can do zipping and unzip alone . It digest a phone number of cipher formats and you could even destine the compression ratio and algorithm while creating the null . In cause you do n’t have Jack ramp up into the bash , install it by running the command sudo apt update & & sudo given - get install sea dog .
deterrent example : tar -cvf test.zip abc.txt
4. man
Back in college when I was learning Unix , man command used to be a living - saver to get through practicals . Now , equate that to Windows help unveiling , it has always been fuzzy . The unspoilt matter about the new Windows terminal is that it support ‘ man ’ Internet Explorer . manual entry for program line . Although these manual entries are only for the Unix Commands , nonetheless it is extremely helpful for users coming from Windows .
representative : man vim
5. type
type is an extremely utilitarian public utility company in Unix . As a beginner , it lets you name functions , assumed name , and keywords reserved in Unix . You just have to suffix the command with case keyword and it tells you the position of the file or false name . The type program line also allows you to append multiple dictation and lam to get a summarise production .
exercise : type particular date ls tryout
6. ps & kill
The ps command works the same as tasklist in Windows . It exhibit the currently lead processes by drug user connected to the system . It is easier to name processes and then kill occupation if they ’re induce any lock . My frequently used transposition with ps command is ps -aux as it tells me the user track running the program line with all the memory and C.P.U. consumption . you’re able to further use the killing command to stamp out the session by PID .
case : ps -aux & & drink down 338
7. df & du
Windows did n’t have a dedicated command line public-service corporation to give you record file utilization or disk costless space . The workaround was through dir statement . But , with Unix in you have the“df”and“du”utility . df command tells you about the free outer space of the Linux filesystem whereas du tells you the outer space utilization of case-by-case files and directories . I used the df command coupled with crontab to send me disk space alerts on my waiter .
Thankfully , df also throw you insight about the window data file system but the naming normal is IFS .
Example : df -h
Read:15 Windows 10 File Explorer Tips and Tricks to practice It like a Pro
8. apt-get
Windows never had a good software program handler and I had to resort to Chocolatey which was okayish to the soap . But now , with the new Windows terminal , it is convenient and efficient to useapt - get . This also enables you to use all the apt - get command line public-service corporation like ffmpeg , youtube - dl , sox on Windows . My favorite one is ffmpeg which lets me encode TV or audio quickly with just a single command .
Example : sudo apt - get install sox
9. wget
wget is another bidding stock utility that lets you download contents from the web server . It might not be append natively so you will have to download it via apt - get . It supports downloading via HTTP , HTTPS , and FTP . Its feature of speech include recursive download , conversion of links for offline wake of local hypertext mark-up language , and support for placeholder .
Example : wget example.com
10. crontab
you may consider crontab as a command - line translation of Windows Task Scheduler . It lets you schedule a command to run at a particular time , day of the week or month . If you incorporate a shell script in the command , you could do multiple undertaking repetitively using crontab . I have used the crontab a tidy sum back in the twenty-four hour period to automate task on an AIX server . Assume , you want a bell to run every undivided hour , you could do that using crontab .
Also , crontab does n’t alert you if the job has not run or the command has failed . So , you need to manually lumber the turnout of the crontab to a logarithm file .
Example : crontab -e
11. Shell Scripts
The most crucial purpose that the new Windows terminal serves is scripting . The new terminal allows you to run plate scripts , PowerShell script , batch scripts , etc . Especially , I love scale scripting and its a suspiration of relief to use it over PowerShell . I have always disliked scripting for Windows in PowerShell as the cmdlets are so complicated with those long electrical switch names . On the other hand , a shell playscript is simple with the merger of normal Unix commands .
For example , if I want to chance out sign in users on my host , I want to write a farseeing handwriting in PowerShell whereas shell script can do that for me in a single mastery .
Wrapping Up
Also Read : Top 6 Useful DOS Commands That You Should lie with