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!

More Related Content

ODP
Ubuntu Terminal
PDF
tmux - An overview of the features of this powerful terminal multiplexer.
PDF
PDF
Introduction to Tmux - Codementor Tmux Office Hours Part 1
PDF
Uses of tmux explained
PDF
Tmux tips and_tricks
PPTX
How to Flush DNS
PDF
TMUX Rocks!
Ubuntu Terminal
tmux - An overview of the features of this powerful terminal multiplexer.
Introduction to Tmux - Codementor Tmux Office Hours Part 1
Uses of tmux explained
Tmux tips and_tricks
How to Flush DNS
TMUX Rocks!

What's hot (20)

PPTX
Terminal commands ubuntu 2
PPTX
Tmux Development Workflow
PPT
14 working with the command line interface
PDF
screen and tmux
PDF
12849144 how-to-install-a-cccam-server-on-windows
PPTX
How to transfer core mode into gui in RedHat/centOs
PDF
Working Remotely (via SSH) Rocks!
PDF
What is cmd windows command prompt
PPTX
Installation of ubuntu, ns3 and compiling first
PPTX
Command prompt presentation
PDF
Linux Command Line Multitasking
PDF
Batch File Programming
DOCX
21 command prompt tricks and hacks
PPT
Npl Wireless Printing
PDF
Vim Rocks!
PPTX
Command-Line 101
DOCX
Getting to know with Command Prompt
PDF
t3chfest 2015 - Zoe in 30 minutes
PPT
Windows 7 Instalation
PDF
Emuladores
Terminal commands ubuntu 2
Tmux Development Workflow
14 working with the command line interface
screen and tmux
12849144 how-to-install-a-cccam-server-on-windows
How to transfer core mode into gui in RedHat/centOs
Working Remotely (via SSH) Rocks!
What is cmd windows command prompt
Installation of ubuntu, ns3 and compiling first
Command prompt presentation
Linux Command Line Multitasking
Batch File Programming
21 command prompt tricks and hacks
Npl Wireless Printing
Vim Rocks!
Command-Line 101
Getting to know with Command Prompt
t3chfest 2015 - Zoe in 30 minutes
Windows 7 Instalation
Emuladores
Ad

Viewers also liked (7)

PPT
Improving your shell usage - 2010
PPTX
Great APIs
PPTX
Mutation Testing - Ruby Edition
PPTX
Mutation Testing
PPTX
Byteman - Carving up your Java code
PPT
Mutation testing
PDF
Mutation Testing
Improving your shell usage - 2010
Great APIs
Mutation Testing - Ruby Edition
Mutation Testing
Byteman - Carving up your Java code
Mutation testing
Mutation Testing
Ad

Similar to Improving your shell usage - 2009 (20)

PPT
02 linux desktop usage
PDF
Unix Basics
ODP
NYPHP March 2009 Presentation
PPTX
Linux Systems Programming: Ubuntu Installation and Configuration
PPTX
Presentation for RHCE in linux
PDF
Linux: A Getting Started Presentation
PDF
Linux Administration for Developers
PPT
Linux
PDF
Bash shell programming in linux
PPTX
Linux Desktop Operation - Session 1
PDF
2018-Summer-Tutorial-Intro-to-Linux.pdf
PDF
Linux Cheat Sheet.pdf
PPTX
Introduce to linux
PPTX
Linux Shell Basics
PPT
PPT
3. introduction of centos
PDF
Unix _linux_fundamentals_for_hpc-_b
PPTX
02 linux desktop usage
Unix Basics
NYPHP March 2009 Presentation
Linux Systems Programming: Ubuntu Installation and Configuration
Presentation for RHCE in linux
Linux: A Getting Started Presentation
Linux Administration for Developers
Linux
Bash shell programming in linux
Linux Desktop Operation - Session 1
2018-Summer-Tutorial-Intro-to-Linux.pdf
Linux Cheat Sheet.pdf
Introduce to linux
Linux Shell Basics
3. introduction of centos
Unix _linux_fundamentals_for_hpc-_b

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
cuic standard and advanced reporting.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
A Presentation on Artificial Intelligence
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
gpt5_lecture_notes_comprehensive_20250812015547.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
Review of recent advances in non-invasive hemoglobin estimation
sap open course for s4hana steps from ECC to s4
cuic standard and advanced reporting.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
A Presentation on Artificial Intelligence
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

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!