Share to: share facebook share twitter share wa share telegram print page

Interface de linha de comandos

Screenshot de uma sessão de shell bash em uma terminal GNOME rodando num Fedora 15.

Uma interface de linha de comandos (ILC), em inglês command-line interface (CLI), é um meio de interagir com um programa de computador, onde o utilizador emite comandos para o programa sob a forma de sucessivas linhas de texto (linhas de comando).[1]

Cada sistema operacional traz um intérprete padrão (o shell (computação)) para aqueles comandos os quais executam tarefas distintas e resolvem diferentes tipos de problemas.[2]

Anatomia de uma ILC de shell

Prompt de comando

Um prompt de comando (ou simplesmente prompt) é uma sequência de (um ou mais) caracteres usados em uma interface de linha de comandos para indicar a prontidão para aceitar comandos. Ele literalmente solicita que o usuário aja. Um prompt geralmente termina com um ou mais caracteres $, %, #, :, > e geralmente inclui outra informação, como o caminho (path) do diretório de trabalho atual e o nome do hospedeiro ou usuário.

Em muitos sistemas Unix e derivados, o prompt comumente utilizado termina em $ ou % se o usuário for um usuário normal, mas em # se o usuário for um super usuário ("root" na terminologia Unix).

Os usuários finais geralmente podem modificar os prompts. Dependendo do ambiente, eles podem incluir cores, caracteres especiais e outros elementos (como variáveis e funções para o horário atual, usuário, número de shell ou diretório de trabalho) para, por exemplo, tornar o prompt mais informativo ou visualmente agradável, para distinguir sessões em várias máquinas ou para indicar o nível atual de aninhamento de comandos. Em alguns sistemas, tokens especiais na definição do prompt podem ser usados para fazer com que programas externos sejam chamados pelo interpretador de linha de comando enquanto exibem o prompt.

No COMMAND.COM do DOS e no cmd.exe do Windows NT, os usuários podem modificar o prompt emitindo um comando prompt ou alterando diretamente o valor da variável de ambiente %PROMPT% correspondente. O padrão da maioria dos sistemas modernos, o estilo C:\> é obtido, por exemplo, com prompt $P$G. O padrão dos sistemas DOS mais antigos, C> é obtido apenas por prompt, embora em alguns sistemas isso produza o estilo C:\> mais recente, a menos que seja usado em unidades de disquete A: ou B:. Nesses sistemas, prompt $N$G pode ser usado para substituir o padrão automático e alternar explicitamente para o estilo antigo.

Muitos sistemas Unix disponibilizam a variável $PS1 (Prompt String 1)[3], apesar de que outras variáveis também possam afetar o prompt (dependendo do shell usado). No shell bash, um prompt da forma [tempo] usuário@hospedeiro: diretório_de_trabalho $ pode ser definido emitindo o seguinte comando: export PS1='[\t] \u@\H: \W $'.

No zsh, a variável $RPROMPT controla um "prompt" opcional no lado direito da tela. Não é um prompt real, pois a localização da entrada de texto não é alterada. Ele é usado para exibir informações na mesma linha que o prompt, mas justificado à direita.

No RISC OS, o prompt de comando é um símbolo * e, portanto, os comandos da CLI são frequentemente chamados de "comandos estrela".[4] Também é possível acessar os mesmos comandos de outras linhas de comando (como a linha de comando BBC BASIC), precedendo o comando com um *.

Notas e Referências

  1. «A linha de comando do Unix e GNU/Linux» (PDF). free-electrons.com. Consultado em 7 de janeiro de 2018 
  2. «Comandos para o terminal (Windows, macOS e Linux)». www.lucascaton.com.br. Consultado em 7 de janeiro de 2018 
  3. Parker, Steve (2011). «11: Choosing and using shells». Shell Scripting: Expert Recipes for Linux, Bash and more. Col: Programmer to programmer. Indianapolis: John Wiley & Sons. p. 262. ISBN 9781118166321. Consultado em 23 de março de 2017. The shell has four different command prompts, called PS1, P52, P53, and PS4. PS stands for Prompt String. 
  4. RISC OS 3 User Guide (PDF). [S.l.]: Acorn Computers Limited. 1 de março de 1992. p. 125 


Ícone de esboço Este artigo sobre Unix é um esboço. Você pode ajudar a Wikipédia expandindo-o.

Read other articles:

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (مارس 2023) هذه مقالة غير مراجعة. ينبغي أن يزال هذا القالب بعد أن يراجعها محرر مغاير للذي أنشأها؛ إذا لزم الأمر فيجب أن توسم المقالة بقوالب الصيانة المناسبة. يمكن أيضاً تقد

 

Uprising against Ottoman rule in Albania Albanian revolt of 1910Depiction of the revolt by The Illustrated Tribune, August 1910DateMay – 24 July 1910LocationKosovo Vilayet, Ottoman EmpireResult Ottoman victory. Rebellion suppressedBelligerents Albanian rebels Support: Serbia[1] Ottoman EmpireCommanders and leaders Isa Boletini Idriz Seferi Nazif Grazhdani Dine Maqellara Sherif Langu Shefqet PashaMehmed PashaStrength Unknown Unknown Albanian revolt of 1910Battle of Kaçanik Pass...

 

Seladang Bos gaurus bull Status konservasi Rentan (IUCN 3.1)[1] Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Mamalia Ordo: Artiodactyla Famili: Bovidae Subfamili: Bovinae Genus: Bos Spesies: B. gaurus Nama binomial Bos gaurusSmith, 1827 Wilayah persebaran saat ini Range map Sinonim Bos gour Hardwicke, 1827 Bos cavifrons Hodgson, 1837, Bibos subhemachalanus Hodgson, 1837 Bos gaur Sundevall, 1846 Bos asseel Horsfield, 1851 Bubalibos annamiticus Heude, 1901 Sela...

أبولو 8 أبولو 8صورة المشغل ناسا  الأعضاء فرانك بورمان،  وجيم لوفل،  ووليام أندرس  تاريخ الإطلاق 21 ديسمبر 1968[1]  الصاروخ ساتورن 5[1]  موقع الإطلاق منصة إطلاق 39a  [لغات أخرى]‏[1]  تاريخ الانحلال 1968  تاريخ الهبوط 27 ديسمبر 1968  موقع الهبوط المح

 

2011 South Korean medical drama BrainPromotional poster for BrainGenreMedical dramaRomanceCreated byKwak Ki-won KBS Drama DivisionWritten byYoon Kyung-ahDirected byYoo Hyun-ki Song Hyun-wookStarringShin Ha-kyunChoi Jung-wonJung Jin-youngJo Dong-hyukComposersPark Seung-jin Choi Min-changCountry of originSouth KoreaOriginal languageKoreanNo. of episodes20ProductionExecutive producerLee Geun-jun (KBS)ProducerMoon Jun-ha (KBS)Production locationSouth KoreaRunning time60 minutes on Mondays and Tue...

 

Municipality in Skåne County, SwedenTomelilla Municipality Tomelilla kommunMunicipalityTomelilla City Hall Coat of armsCoordinates: 55°33′N 13°57′E / 55.550°N 13.950°E / 55.550; 13.950CountrySwedenCountySkåne CountySeatTomelillaArea[1] • Total397.39 km2 (153.43 sq mi) • Land395.94 km2 (152.87 sq mi) • Water1.45 km2 (0.56 sq mi) Area as of 1 January 2014.Population...

Advantage of White over Black in chess Wilhelm Steinitz, who in 1889 claimed chess is a draw with best play In chess, there is a consensus among players and theorists that the player who makes the first move (White) has an inherent advantage, albeit not one large enough to win under perfect play. This view has been the consensus since at least 1889, when the first World Chess Champion, Wilhelm Steinitz, addressed the issue, although chess has not been solved. Since 1851, compiled statistics s...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) The topic of this article may not meet Wikipedia's general notability guideline. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged,...

 

Closed railway line in the UK vteBlackpool & Fleetwood branch lines Legend Fleetwood Wyre Dock Burn Naze Halt Thornton–Cleveleys Ramper Road Poulton Curve Halt Layton Poulton-le-Fylde originalsecond Blackpool North Singleton Blackpool Central Blackpool South Kirkham and Wesham South Shore Salwick BlackpoolPleasure Beach Lea Road Squires Gate West Coast Main Line Gillett's Crossing Halt Preston & Longridge Rly St Annes-on-the-Sea Maudlands Ansdell and Fairhaven Pr...

Mixed gender team sport This article is about Korfball. For the mini-baseball game, see Corkball. KorfballOutdoor korfball match in the NetherlandsHighest governing bodyInternational Korfball FederationFirst played1902CharacteristicsContactLimitedTeam members8 per side: 4 male players and 4 female playersMixed-sexYesTypeTeam sport, ball sportEquipmentKorfballVenueKorfball courtPresenceOlympicDemonstration sport in 1920 and 1928World Games1985–present Outdoor Korfball Korfball (Dutch: k...

 

XVI Distrito Electoral Federal de Ciudad de México(Suprimido) Distrito electoral federalEntidad Distrito electoral federal • País México México • Estado Ciudad de México • Circunscripción electoral Cuarta circunscripción[1]​Alcaldías Magdalena ContrerasÁlvaro ObregónEventos históricos   • Creación 1973[editar datos en Wikidata] El XXVI Distrito Electoral Federal de Ciudad de México fue un antiguo distrito de Ciudad de México que e...

 

1956 studio album by Webb PierceThe Wondering BoyStudio album by Webb PierceReleasedAugust 1956GenreCountryLabelDeccaWebb Pierce chronology Webb Pierce(1955) The Wondering Boy(1956) Just Imagination(1958) Singles from The Wondering Boy WonderingReleased: September 28, 1951 That Heart Belongs to MeReleased: May 17, 1952 Back Street AffairReleased: September 15, 1952 It's Been So LongReleased: June 17, 1953 There Stands the GlassReleased: September 21, 1953 SlowlyReleased: January 8, 19...

SchoolBarnwell High SchoolLocation Barnwell High School is a public high school in Barnwell, South Carolina. It has about 625 students.[1] The Warhorse is the school's mascot.[2] Most of the student body is African American or white. The entire student body was categorized as economically disadvantaged.[1] Prior to desegregation there was a Barnwell High School for African American students in Barnwell. It was succeeded by Butler High School.[3] History In 1915...

 

Карта говоров и диалектов бразильского варианта португальского языка: 1 —Кайпира 2 — Северного побережья[en] 3 — Байяно 4 — Флюминенсе 5 — Гаучо 6 — Минейро[en] 7 — Нордестино 8 — Нортиста 9 — Паулистано[en] 10 — Сертаньехо 11 — Сулиста 12 — Флориа...

 

FC UtrechthNama lengkapFootball Club UtrechtJulukanUtregBerdiri1 Juli 1970; 53 tahun lalu (1970-07-01)StadionStadion GalgenwaardUtrecht(Kapasitas: 24.426)KetuaWilco van SchaikManajerJohn van den BromLigaEredivisie2018–2019Eredivisie, 6thSitus webSitus web resmi klub Kostum kandang Kostum tandang Kostum ketiga Musim ini FC Utrecht (pengucapan bahasa Belanda: [ɛf.ˈseː ˈy.trɛxt]) adalah klub sepak bola Belanda yang berbasi di kota Utrecht. Klub ini adalah merger dari tiga k...

Book by Anthony Burgess This article needs a plot summary. Please add one in your own words. (December 2019) (Learn how and when to remove this template message) First edition (publ. Sidgwick & Jackson) The Eve of Saint Venus is a story or, as author Anthony Burgess (pen-name of John Burgess Wilson) put it, an opusculum,[1] on the theme of marriage. Originally conceived as a play in three acts in 1952, it was re-written as a novella after the author initially failed to find a thea...

 

Nakatsuhime Yakushiji Princess Nakatsu, also known as Nakatsu-hime no Mikoto, is a figure in Japanese mythology who was the consort of Emperor Ōjin and the mother of Emperor Nintoku.[1][2] History There are few known episodes of Princess Nakatsu's life, but she is venerated as a goddess at Hachiman shrines.[1] Princess Nakatsu was the daughter of Hondamawaka no Ō (also known as Hondamawaka no Mikoto), a descendant of Emperor Kōshō and her mother was Kana-taya hime....

 

Australian Army infantry battalion For other uses, see 2/6th Battalion (Australia) and 6th Battalion, Royal Australian Regiment. 6th BattalionMembers of the 6th Battalion in August 1918 near Lihons during the Battle of AmiensActive1914–19191921–19441948–19601965–1975CountryAustraliaBranchAustralian ArmyTypeInfantryRoleLine infantrySize~700–1,000 personnel[a]Part ofAustralian 2nd BrigadeMotto(s)Semper Paratus (Always Ready)ColoursPurple over redMarchWaltzing MatildaEngag...

Defunct Soviet state-owned trading company ElektronorgtechnicaIndustryImport/export of electronicsFounded1971Defunct2005FateSold to The Tetris Company in 2005HeadquartersMoscow, RussiaParentMinistry of Foreign Trade of the USSR (until 1989) Integrated circuits with the logo of Elektronorgtechnika Elektronorgtechnica (also spelled Electronorgtechnica, Russian: Всесою́зное Объедине́ние «Электро́норгтехника», tr. Vsesoyúznoye Obyedinéniye Elektr�...

 

Bus terminus in Tiruchirappalli Central Bus StationA.S.G. Lourdasamy Pillai Central Bus StationGeneral informationLocationV.O.C. Road, Cantonment,Tiruchirappalli, Tamil Nadu.PIN – 620 001.IndiaCoordinates10°47′55″N 78°40′50″E / 10.7987°N 78.6805°E / 10.7987; 78.6805Owned byTiruchirappalli Municipal CorporationOperated byDepartment of Transport (Tamil Nadu)Platforms5 (77 Bays)ConstructionParkingYesBicycle facilitiesYesAccessibleOther informati...

 
Kembali kehalaman sebelumnya