Mac的Terminal的窗口,"ttys000"是什么意思?背后有什么故事么
2个回答
展开全部
PC上的串口一般是ttyS,板子上Linux的串口一般叫做ttySAC,是usb口转串口的是ttyUSB,外插串口卡的话默认是dev下的ttyS* ,一般ttyS0对应com1,ttyS1对应com2
百度百科链接:SL
串行接口简称串口,也称串行通信接口或串行通讯接口(通常指COM接口),是采用串行通信方式的扩展接口。串行接口(Serial Interface) 是指数据一位一位地顺序传送,其特点是通信线路简单,只要一对传输线就可以实现双向通信(可以直接利用电话线作为传输线),从而大大降低了成本,特别适用于远距离通信,但传送速度较慢。
mac是一款类unix系统,然后源码如下:
#
# @(#)ttys 5.2 (Berkeley) 6/10/93
#
# name getty type status comments
#
#console "/usr/libexec/getty std.57600" vt100 on secure
console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow" vt100 on secure onoption="/usr/libexec/getty std.9600"
#tahoe's only
#remote "/usr/libexec/getty std.1200" pt on # diagnostics
# The tty.serial entry initializes the serial port (if any) for use as a
# terminal (enabling logons over serial). If marked secure, the serial
# port will allow root logons.
# To make the serial port available for outbound
# communications, the tty.serial entry should be turned off
# (set the 4th field to off).
tty.serial "/usr/libexec/getty serial.57600" vt100 off secure
# Fax reception is off by default, use the
# System Preferences panel to enable it.
fax "/usr/bin/fax answer" unknown off
# Hardwired lines are marked off, by default, so getty(8)
# is quiet when they don't exist.
tty[00-07] "/usr/libexec/getty std.9600" unknown off secure
# pseudo-ttys
ttyp[0x0-0xf] none network slot=36
ttyq[0x0-0xf] none network
ttyr[0x0-0xf] none network
ttys[0x0-0xf] none network
ttyt[0x0-0xf] none network
ttyu[0x0-0xf] none network
ttyv[0x0-0xf] none network
ttyw[0x0-0xf] none network
# cloning ptys
ttys[000-999] none network
展开全部
启动finder,在出现的窗口的左列表框的places中选择applications,进一步选择utilities文件夹进入,我们会开到一个黑色屏幕图标的terminal。双击启动。显示的内容如下:Lastlogin:TueAug1822:32:29onttys000yan-lis-macbook-pro:~yanli$其中~表示的是当前用户的根目录。yan-lis-macbook-pro:~yanli$lsDesktopMoviesSendRegistrationDocumentsMusicSitesDownloadsPicturesLibraryPublicyan-lis-macbook-pro:~yanli$如果我们进入到其他目录太深,我们可以使用cd~立即会到自己的根目录下:Lastlogin:TueAug1822:32:29onttys000yan-lis-macbook-pro:~yanli$lsDesktopMoviesSendRegistrationDocumentsMusicSitesDownloadsPicturesLibraryPublicyan-lis-macbook-pro:~yanli$cdLibrary/yan-lis-macbook-pro:Libraryyanli$lsAddressBookPlug-InsDictionariesPreferencePanesApplicationSupportFavoritesPreferencesAssistantsFontCollectionsPrintersAudioFontsPubSubAutosaveInformationInputMethodsSafariCachesInternetPlug-InsScreenSaversCalendarsKeyboardLayoutsSoundsColorPickersKeychainsVoicesCompositionsLogsiMovieCookiesMailyan-lis-macbook-pro:Libraryyanli$cd~yan-lis-macbook-pro:~yanli$lsDesktopMoviesSendRegistrationDocumentsMusicSitesDownloadsPicturesLibraryPublicyan-lis-macbook-pro:~yanli$使用cd..可以回退到当前目录的父目录:yan-lis-macbook-pro:Usersyanli$lsSharedyanliyan-lis-macbook-pro:Usersyanli$如果你对一个命令的用法不了解,你可以使用:这些就是最基本的操作,如果你是linux高手,那么你一定会使用很多命令吧!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询