⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linux_faq.lyx

📁 CNC 的开放码,EMC2 V2.2.8版
💻 LYX
字号:
#LyX 1.3 created this file. For more info see http://www.lyx.org/\lyxformat 221\textclass book\language english\inputencoding auto\fontscheme default\graphics default\paperfontsize default\spacing single \papersize Default\paperpackage a4\use_geometry 0\use_amsmath 0\use_natbib 0\use_numerical_citations 0\paperorientation portrait\secnumdepth 3\tocdepth 3\paragraph_separation skip\defskip smallskip\quotes_language english\quotes_times 2\papercolumns 1\papersides 1\paperpagestyle default\layout ChapterLinux FAQ\begin_inset LatexCommand \index{Linux FAQ}\end_inset \layout StandardThese are some basic Linux commands and techniques for new to Linux users. More complete information can be found on the web or by using the man pages.\layout SectionAutomatic Login\layout StandardWhen you install EMC2 with the Ubuntu LiveCD the default is to have to log in each time you turn the computer on. To enable automatic login go to System/Administration/Login Window. If it is a fresh install the Login Window might take a second or three to pop up. You will have to have your password that you used for the install to gain acess to the Login Window Preferences window. In the Security tab check off Enable Automatic Login and pick a user name from the list (that would be you). \layout SectionMan Pages\begin_inset LatexCommand \index{Man Pages}\end_inset \begin_inset LatexCommand \label{sec:Man-Pages}\end_inset \layout StandardMan pages are automatically generated manual pages in most cases. Man pages are usually available for most programs and commands in Linux.\layout StandardTo view a man page open up a terminal window by going to Applications, Accessories, Terminal. For example if you wanted to find out something about the find command in the terminal window type:\layout LyX-Codeman find\layout StandardUse the Page Up and Page Down keys to view the man page and the Q key to quit viewing.\layout SectionList Modules\layout StandardSometimes when troubleshooting you need to get a list of modules that are loaded. In a terminal window type:\layout LyX-Codelsmod\layout StandardIf you want to send the output from lsmod to a text file in a terminal window type:\layout LyX-Codelsmod > mymod.txt\layout StandardThe resulting text file will be located in the home directory if you did not change directories when you opened up the terminal window and it will be named mymod.txt or what ever you named it.\layout SectionEditing a Root File\begin_inset LatexCommand \index{Editing a Root File}\end_inset \begin_inset LatexCommand \label{sec:Editing-a-Root}\end_inset \layout StandardWhen you open the file browser and you see the Owner of the file is root you must do extra steps to edit that file. Editing some root files can have bad results. Be careful when editing root files. You can open and view most root files normally but they will open in \begin_inset Quotes eld\end_inset read only\begin_inset Quotes erd\end_inset  mode.\layout SubsectionThe Command Line Way\begin_inset LatexCommand \index{sudo gedit}\end_inset \layout StandardOpen up Applications, Accessories, Terminal.\layout StandardIn the terminal window type:\layout LyX-Codesudo gedit\layout StandardOpen the file with File, Open then edit\layout SubsectionThe GUI Way\begin_inset LatexCommand \index{gksudo}\end_inset \layout EnumerateRight click on the desktop and select Create Launcher\layout EnumerateType a name in like sudo edit\layout EnumerateType \family typewriter \series bold gksudo \begin_inset Quotes eld\end_inset gnome-open %u\begin_inset Quotes erd\end_inset \family default \series default  as the command and save the launcher to your desktop\layout EnumerateDrag a file onto your launcher to open and edit\layout SectionTerminal Commands\begin_inset LatexCommand \index{Terminal Commands}\end_inset \begin_inset LatexCommand \label{sec:Terminal-Commands}\end_inset \layout SubsectionWorking Directory\begin_inset LatexCommand \index{Working Directory}\end_inset \begin_inset LatexCommand \index{pwd}\end_inset \layout StandardTo find out the path to the present working directory in the terminal window type:\layout LyX-Codepwd\layout SubsectionChanging Directories\begin_inset LatexCommand \index{Changing Directories}\end_inset \begin_inset LatexCommand \index{cd}\end_inset \layout StandardTo move up one level in the terminal window type:\layout LyX-Codecd ..\layout StandardTo move up two levels in the terminal window type:\layout LyX-Codecd ../..\layout StandardTo move down to the emc2/configs subdirectory in the terminal window type:\layout LyX-Codecd emc2/configs\layout SubsectionListing files in a directory\begin_inset LatexCommand \index{Listing files in a directory}\end_inset \begin_inset LatexCommand \index{dir}\end_inset \begin_inset LatexCommand \index{ls}\end_inset \layout StandardTo view a list of all the files and subdirectories in the terminal window type:\layout LyX-Codedir\layout Standardor \layout LyX-Codels\layout SubsectionFinding a File\begin_inset LatexCommand \index{Finding a File}\end_inset \begin_inset LatexCommand \index{find}\end_inset \layout StandardThe find command can be a bit confusing to a new Linux user. The basic syntax is:\layout LyX-Codefind starting-directory parameters actions\layout StandardFor example to find all the .ini files in your EMC2 directory you first need to use the pwd command to find out the directory. Open a new terminal window and type:\layout LyX-Codepwd\layout Standardmight return the following result\layout LyX-Code/home/joe\layout StandardWith this information put the command together like this:\layout LyX-Codefind /home/joe/emc2 -name *.ini -print\layout StandardThe -name is the name of the file your looking for and the -print tells it to print out the result to the terminal window. The *.ini tells find to return all files that have the .ini extension. \layout StandardTo find all the files in the directory named and all the subdirectories under that add the -L option to the find command like this:\layout LyX-Codefind -L /home/joe/emc2 -name *.ini -print\layout SubsectionSearching for Text\begin_inset LatexCommand \index{Searching for Text}\end_inset \begin_inset LatexCommand \index{grep}\end_inset \layout LyX-Codegrep -i -r 'text to search for' * \layout StandardTo find all the files that contain the 'text to search for' in the current directory and all the subdirectories below the current while ignoring the case. The -i is for ignore case and the -r is for recursive (include all subdirectories in the search). The * is a wild card for search all files.\layout SectionHardware Problems\layout SubsectionHardware Info\layout StandardTo find out what hardware is connected to your motherboard in a terminal window type:\layout LyX-Codelspci -v\layout SubsectionMonitor Resolution\layout StandardDuring installation Ubuntu attempts to detect the monitor settings. If this fails you are left with a generic monitor with a maximum resolution of 800x600. \layout StandardInstructions for fixing this are located here:\layout Standard\begin_inset LatexCommand \url{https://help.ubuntu.com/community/FixVideoResolutionHowto}\end_inset \the_end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -