SlideShare a Scribd company logo
Improving your shell usage
Learn how to get around
Where am I?
The pwd command will show you the current working directory:
Learn how to get around
Listing directory contents
The ls command lists the contents of current directory:
Learn how to get around
Changing directory
The cd command will change to the directory specified:
Editing files
Manually
Usual choices of editors to use on the command line are:
    – nano – Tiny learning curve, shortcuts displayed by default
    – vim – Powerful, steeper learning curve, more features (my preferred editor)
    – emacs – I’ve never used it. Steep learning curve, powerful, lots of features.
Command History
A faster way to retype commands
When you type commands into your shell, they are stored in a history file. You
can access previous commands using the up arrow key. The down key
obviously goes the other way in your history.
Command History
Searching through History
You can also search through your history like you would use the "find" tool in
a browser or text editor. Use Ctrl+R, and you should see something like this:




As you type, it will narrow down hits in your history.
Persistent Sessions with GNU Screen
Allows you to leave things running on a machine which you want to come
back to later. Some common use cases:
    – Working on a remote machine (via something like PuTTY) on an unstable connection. If
      you get disconnected, this will allow you to resume exactly where you left off
    – On your own linux machine when updating and restarting the graphical environment.
      The update program, if running in a graphical terminal (like gnome-terminal or xterm)
      will be killed partway through the process if you are not running them separately in
      screen.
    – Running programs on remote machines that won't run in the background.
    – Lurking in chat channels by running your IM clients on a machine that has more uptime
      than yours
Persistent Sessions with GNU Screen
Creating a session
You can create a new session by just using the "screen" command.
Persistent Sessions with GNU Screen
Resuming a session
The -r switch is used to reattach a screen session.

$ screen -r
[where you were in your previous session]
Persistent Sessions with GNU Screen
Resuming a session
If you're already attached to a session from somewhere else, you'll see
something like this:

$ screen -r
There are screens on:
     15716.pts-4.viglab-26 (Attached)
There is no screen to be resumed.
Persistent Sessions with GNU Screen
Resuming a session
You can remote detach from this session, freeing it up for you to resume
here. Use screen -d to do this, however we will insist on using -D because
this both detaches the session and logs out the parent shell, which is far
safer.

$ screen -D
[15716.pts-4.viglab-26 power detached.]

You can of course combine the two switches 'screen -Dr' to remote detach,
then reattach here.
Persistent IRC connections – irssi in
                    screen
Starting irssi and connecting
After creating a screen/attaching an previously created screen, run irssi.

$ irssi

In irssi, to connect to a server you use the /connect command as follows:

/connect <Server Address>
Persistent IRC connections – irssi in
                   screen
Joining a channel
Having connected you’ll probably want to talk to people. You join a channel
with /join. In this case we’ll join our main channel.

/join #compsoc
Persistent IRC connections – irssi in
                   screen
Switching channels
To switch between channels is simple. Windows 1-19 can be accessed
through pressing alt and either a number 1 to 0 above the letter keys or a
letter between q and o (ie most of the top row of the qwerty keyboard). After
that you simply use the command:

/win <Window Number>
Persistent IRC connections – irssi in
                   screen
Leaving a channel
Leaving a channel is simple. Simply navigate to the correct window and run:

/part <Quit Message>
The End(ish)
• You should be able to log into your UWCS shell account and get started.
• Don’t be afraid to ask someone if you’re having problems, but the majority
of the time there will be a good answer available if you google for your
problem.
• What I’ve talked about is only an introduction. This talk could probably last a
year and still not cover everything. You will definitely pick things up as you go
along.
• Don’t be daunted by what might be a completely new way of using a
computer for you. Simply having a go is the best way to learn!


                           Onward to DCS!
Ad

More Related Content

What's hot (20)

Terminal commands ubuntu 2
Terminal commands ubuntu 2Terminal commands ubuntu 2
Terminal commands ubuntu 2
raj upadhyay
 
Tmux Development Workflow
Tmux Development WorkflowTmux Development Workflow
Tmux Development Workflow
jschembri
 
14 working with the command line interface
14 working with the command line interface14 working with the command line interface
14 working with the command line interface
hafizhanif86
 
screen and tmux
screen and tmuxscreen and tmux
screen and tmux
Hsi-Kai Wang
 
12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows
rajuy2r
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOs
Md Shihab
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
Kent Chen
 
What is cmd windows command prompt
What is cmd windows command promptWhat is cmd windows command prompt
What is cmd windows command prompt
Subrata Das
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling first
Jawad Khan
 
Command prompt presentation
Command prompt presentationCommand prompt presentation
Command prompt presentation
Muhammad Taj
 
Linux Command Line Multitasking
Linux Command Line MultitaskingLinux Command Line Multitasking
Linux Command Line Multitasking
Amr Fawzy
 
Batch File Programming
Batch File ProgrammingBatch File Programming
Batch File Programming
Frz Khan
 
21 command prompt tricks and hacks
21 command prompt tricks and hacks21 command prompt tricks and hacks
21 command prompt tricks and hacks
Abdullah Khosa
 
Npl Wireless Printing
Npl Wireless PrintingNpl Wireless Printing
Npl Wireless Printing
nplslides
 
Vim Rocks!
Vim Rocks!Vim Rocks!
Vim Rocks!
Kent Chen
 
Command-Line 101
Command-Line 101Command-Line 101
Command-Line 101
Artefactual Systems - AtoM
 
Getting to know with Command Prompt
Getting to know with Command PromptGetting to know with Command Prompt
Getting to know with Command Prompt
Binna Krassniqi
 
t3chfest 2015 - Zoe in 30 minutes
t3chfest 2015 - Zoe in 30 minutes t3chfest 2015 - Zoe in 30 minutes
t3chfest 2015 - Zoe in 30 minutes
David Muñoz Díaz
 
Windows 7 Instalation
Windows 7 InstalationWindows 7 Instalation
Windows 7 Instalation
RonelynGuntinas
 
Emuladores
EmuladoresEmuladores
Emuladores
Bayoch
 
Terminal commands ubuntu 2
Terminal commands ubuntu 2Terminal commands ubuntu 2
Terminal commands ubuntu 2
raj upadhyay
 
Tmux Development Workflow
Tmux Development WorkflowTmux Development Workflow
Tmux Development Workflow
jschembri
 
14 working with the command line interface
14 working with the command line interface14 working with the command line interface
14 working with the command line interface
hafizhanif86
 
12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows
rajuy2r
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOs
Md Shihab
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
Kent Chen
 
What is cmd windows command prompt
What is cmd windows command promptWhat is cmd windows command prompt
What is cmd windows command prompt
Subrata Das
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling first
Jawad Khan
 
Command prompt presentation
Command prompt presentationCommand prompt presentation
Command prompt presentation
Muhammad Taj
 
Linux Command Line Multitasking
Linux Command Line MultitaskingLinux Command Line Multitasking
Linux Command Line Multitasking
Amr Fawzy
 
Batch File Programming
Batch File ProgrammingBatch File Programming
Batch File Programming
Frz Khan
 
21 command prompt tricks and hacks
21 command prompt tricks and hacks21 command prompt tricks and hacks
21 command prompt tricks and hacks
Abdullah Khosa
 
Npl Wireless Printing
Npl Wireless PrintingNpl Wireless Printing
Npl Wireless Printing
nplslides
 
Getting to know with Command Prompt
Getting to know with Command PromptGetting to know with Command Prompt
Getting to know with Command Prompt
Binna Krassniqi
 
t3chfest 2015 - Zoe in 30 minutes
t3chfest 2015 - Zoe in 30 minutes t3chfest 2015 - Zoe in 30 minutes
t3chfest 2015 - Zoe in 30 minutes
David Muñoz Díaz
 
Emuladores
EmuladoresEmuladores
Emuladores
Bayoch
 

Viewers also liked (7)

Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010
Chris Sinjakli
 
Great APIs
Great APIsGreat APIs
Great APIs
Chris Sinjakli
 
Mutation Testing - Ruby Edition
Mutation Testing - Ruby EditionMutation Testing - Ruby Edition
Mutation Testing - Ruby Edition
Chris Sinjakli
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
Chris Sinjakli
 
Byteman - Carving up your Java code
Byteman - Carving up your Java codeByteman - Carving up your Java code
Byteman - Carving up your Java code
Chris Sinjakli
 
Mutation testing
Mutation testingMutation testing
Mutation testing
Tao He
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
ESUG
 
Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010
Chris Sinjakli
 
Mutation Testing - Ruby Edition
Mutation Testing - Ruby EditionMutation Testing - Ruby Edition
Mutation Testing - Ruby Edition
Chris Sinjakli
 
Byteman - Carving up your Java code
Byteman - Carving up your Java codeByteman - Carving up your Java code
Byteman - Carving up your Java code
Chris Sinjakli
 
Mutation testing
Mutation testingMutation testing
Mutation testing
Tao He
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
ESUG
 
Ad

Similar to Improving your shell usage - 2009 (20)

Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
wensheng wei
 
Linux
Linux Linux
Linux
Mindtree
 
11 unix osx_commands
11 unix osx_commands11 unix osx_commands
11 unix osx_commands
Macinfosoft
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
rajikaa
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
Glen Ogilvie
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
karlhennesey
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine
Youssoufou YABRE
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
roschahacker
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
Dbw manual
Dbw manualDbw manual
Dbw manual
Minh Tuan Nguyen
 
Batch file-programming
Batch file-programmingBatch file-programming
Batch file-programming
jamilur
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
alan moreno
 
Users guide
Users guideUsers guide
Users guide
Horlarthunji Azeez
 
Unix Lec2
Unix Lec2Unix Lec2
Unix Lec2
Dr.Ravi
 
I Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on LinuxI Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on Linux
Sagar Kumar
 
Linux
LinuxLinux
Linux
Rathan Raj
 
Intro xp linux
Intro xp linuxIntro xp linux
Intro xp linux
kalaisundaram
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
Nitesh Nayal
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
wensheng wei
 
11 unix osx_commands
11 unix osx_commands11 unix osx_commands
11 unix osx_commands
Macinfosoft
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
Glen Ogilvie
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
karlhennesey
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine
Youssoufou YABRE
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
roschahacker
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
Batch file-programming
Batch file-programmingBatch file-programming
Batch file-programming
jamilur
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
alan moreno
 
Unix Lec2
Unix Lec2Unix Lec2
Unix Lec2
Dr.Ravi
 
I Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on LinuxI Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on Linux
Sagar Kumar
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
Nitesh Nayal
 
Ad

Recently uploaded (20)

machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 

Improving your shell usage - 2009

  • 2. Learn how to get around Where am I? The pwd command will show you the current working directory:
  • 3. Learn how to get around Listing directory contents The ls command lists the contents of current directory:
  • 4. Learn how to get around Changing directory The cd command will change to the directory specified:
  • 5. Editing files Manually Usual choices of editors to use on the command line are: – nano – Tiny learning curve, shortcuts displayed by default – vim – Powerful, steeper learning curve, more features (my preferred editor) – emacs – I’ve never used it. Steep learning curve, powerful, lots of features.
  • 6. Command History A faster way to retype commands When you type commands into your shell, they are stored in a history file. You can access previous commands using the up arrow key. The down key obviously goes the other way in your history.
  • 7. Command History Searching through History You can also search through your history like you would use the "find" tool in a browser or text editor. Use Ctrl+R, and you should see something like this: As you type, it will narrow down hits in your history.
  • 8. Persistent Sessions with GNU Screen Allows you to leave things running on a machine which you want to come back to later. Some common use cases: – Working on a remote machine (via something like PuTTY) on an unstable connection. If you get disconnected, this will allow you to resume exactly where you left off – On your own linux machine when updating and restarting the graphical environment. The update program, if running in a graphical terminal (like gnome-terminal or xterm) will be killed partway through the process if you are not running them separately in screen. – Running programs on remote machines that won't run in the background. – Lurking in chat channels by running your IM clients on a machine that has more uptime than yours
  • 9. Persistent Sessions with GNU Screen Creating a session You can create a new session by just using the "screen" command.
  • 10. Persistent Sessions with GNU Screen Resuming a session The -r switch is used to reattach a screen session. $ screen -r [where you were in your previous session]
  • 11. Persistent Sessions with GNU Screen Resuming a session If you're already attached to a session from somewhere else, you'll see something like this: $ screen -r There are screens on: 15716.pts-4.viglab-26 (Attached) There is no screen to be resumed.
  • 12. Persistent Sessions with GNU Screen Resuming a session You can remote detach from this session, freeing it up for you to resume here. Use screen -d to do this, however we will insist on using -D because this both detaches the session and logs out the parent shell, which is far safer. $ screen -D [15716.pts-4.viglab-26 power detached.] You can of course combine the two switches 'screen -Dr' to remote detach, then reattach here.
  • 13. Persistent IRC connections – irssi in screen Starting irssi and connecting After creating a screen/attaching an previously created screen, run irssi. $ irssi In irssi, to connect to a server you use the /connect command as follows: /connect <Server Address>
  • 14. Persistent IRC connections – irssi in screen Joining a channel Having connected you’ll probably want to talk to people. You join a channel with /join. In this case we’ll join our main channel. /join #compsoc
  • 15. Persistent IRC connections – irssi in screen Switching channels To switch between channels is simple. Windows 1-19 can be accessed through pressing alt and either a number 1 to 0 above the letter keys or a letter between q and o (ie most of the top row of the qwerty keyboard). After that you simply use the command: /win <Window Number>
  • 16. Persistent IRC connections – irssi in screen Leaving a channel Leaving a channel is simple. Simply navigate to the correct window and run: /part <Quit Message>
  • 17. The End(ish) • You should be able to log into your UWCS shell account and get started. • Don’t be afraid to ask someone if you’re having problems, but the majority of the time there will be a good answer available if you google for your problem. • What I’ve talked about is only an introduction. This talk could probably last a year and still not cover everything. You will definitely pick things up as you go along. • Don’t be daunted by what might be a completely new way of using a computer for you. Simply having a go is the best way to learn! Onward to DCS!