Udemybeginnerzh

Windows和Linux终端与命令入门课

解放双手,高效工作

3.4(6)
301students
1h 29m
Liuxiaoyang Liu
Liuxiaoyang Liu匿名安全研究员

Course Content

Windows和Linux终端与命令入门课 is a beginner-level Udemy course taught by Liuxiaoyang Liu. It runs 1h 29m and is taught in Chinese. Learners rate it 3.4 out of 5 from 6 reviews, with 301 students enrolled. It is free to enroll, first published November 2021.

Master the Command Line: Essential Skills for Developers & System Administrators

Unlock the power of the command line! This course provides a comprehensive introduction to navigating and utilizing command-line interfaces (CLIs) in both Windows and Linux operating systems. Learn to boost your productivity, automate tasks, and gain deeper control over your system – all without needing complex graphical user interfaces. This is a fundamental skill for developers, system administrators, and anyone seeking a more efficient way to interact with their computer. Best of all, you can start using these powerful tools immediately – no need to install extra software!

Why Learn Command Line?

The command line offers a powerful and efficient alternative to graphical interfaces. It's a cornerstone of system administration and a vital tool for developers. Here's why mastering it is essential:

  • Efficiency: Perform tasks much faster than navigating through menus.
  • Security: A command-line environment often provides a more secure way to manage system resources.
  • Automation: Write scripts to automate repetitive tasks and streamline workflows.
  • Direct Control: Interact with your operating system at a fundamental level.
  • Developer-Friendly: Mimics function calls, making it a natural fit for developer workflows.
  • Reduced UI Development: For simple data input/output programs, the command line can significantly reduce the effort required to build a user interface.

Getting Started: Accessing the Command Line

Windows:

  1. Press Win + R, type cmd, and press Enter to open the Command Prompt.
  2. For system administrator privileges, run cmd as administrator.

Linux:

  1. Press Ctrl + Alt + T or click the terminal icon.

User Permissions:

  • Regular User: Uses $ prompt.
  • Root/Administrator: Uses # prompt.
  • Switching Permissions: Use sudo (Linux) or run cmd as administrator (Windows).
  • Switching Users: Use su username (Linux) and enter the password.

Important Note: Command-line commands are case-insensitive in Windows but case-sensitive in Linux.

File Management with the Command Line

Gain precise control over your files and directories.

  • Current Path:
    • Windows: cd (change directory)
    • Linux: pwd (print working directory)
  • Listing Files:
    • Windows: dir
    • Linux: ls -alh (shows hidden files)
  • Deleting Files:
    • Windows: erase
    • Linux: rm (remove)
      • rm -rf (forcefully remove directories and files)
      • rm -rf * (remove all files and directories in the current directory – use with caution!)
  • Viewing File Content:
    • Windows: type or more
    • Linux: cat (concatenate and display) or strings
  • Writing to Files:
    • Windows & Linux: echo
      • echo > filename (overwrite file)
      • echo >> filename (append to file)
  • Merging Files:
    • Windows: type file1.txt file2.txt > file3.txt
    • Linux: cat file1.txt file2.txt > file3.txt

Understanding Environment Variables

Environment variables store information about your system and applications. They tell the operating system where to find executable programs.

  • Viewing All Environment Variables:
    • Windows: set
    • Linux: env
  • Viewing the PATH Environment Variable: (This is crucial for finding executables)
    • Windows: set PATH or echo %PATH%
    • Linux: env | grep PATH or echo $PATH
  • Temporary PATH Modification (Linux): export PATH=$PATH:/somewhere
  • Permanent PATH Modification (Linux): Edit ~/.bash_profile, ~/.bashrc, or ~/.profile and add export PATH=$PATH:/somewhere

Handling Errors with File Black Holes

Prevent errors from cluttering your terminal.

  • Redirecting Standard Error:
    • Windows: command 2>nul (discard standard error)
    • Linux: command 2>/dev/null

$ whoami — the devs behind tutorialsearch.io

Need a web app built? Hire the team behind TutorialSearch.io

We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.

5.0(81)
38m
beginner
5.0(10)
1h 46m
all

中國針灸學:初階【認識經絡與穴位】

by 駿緯視聽醫學器材股份有限公司 MEDITALENT ENTERPRISES LTD.

5.0(1)
5h 2m
all

中國針灸學-21.針刺補瀉

by 駿緯視聽醫學器材股份有限公司 MEDITALENT ENTERPRISES LTD.

5.0(2)
44m
all