Difference between revisions of "Linux Questions"
(add section for ksu wifi) |
(update references to CIS with CS) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | '''NOTE:''' Parts of this document are borrowed heavily from the excellent documentation found in the [http://support.beocat | + | '''NOTE:''' Parts of this document are borrowed heavily from the excellent documentation found in the [http://support.beocat.ksu.edu/BeocatDocs/index.php/LinuxBasics Beocat wiki]. Please have a look there for more details and in-depth examples. |
+ | <div id="ConnectLinux"></div> | ||
== How do I connect to Linux systems? == | == How do I connect to Linux systems? == | ||
− | To login remotely to | + | To login remotely to CS Linux systems, you first need an "SSH Client". SSH, short for "secure shell", is a protocol that allows secure communication between two computers. We recommend the following. |
* Windows | * Windows | ||
− | ** [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] is by far the most common SSH client, both for | + | ** [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] is by far the most common SSH client, both for CS and in the world. |
** [http://mobaxterm.mobatek.net/ MobaXterm] is a fairly new client with some nice features, such as being able to SCP/SFTP (see below), and running X (Linux graphical desktop). | ** [http://mobaxterm.mobatek.net/ MobaXterm] is a fairly new client with some nice features, such as being able to SCP/SFTP (see below), and running X (Linux graphical desktop). | ||
** [http://www.cygwin.com/ Cygwin] is for those that would rather be running Linux but are stuck on Windows. It's purely a text interface. | ** [http://www.cygwin.com/ Cygwin] is for those that would rather be running Linux but are stuck on Windows. It's purely a text interface. | ||
* Macintosh | * Macintosh | ||
− | ** OS-X has SSH a built-in application called "Terminal". It's not great, but it will work for most | + | ** OS-X has SSH a built-in application called "Terminal". It's not great, but it will work for most CS users. |
** [http://www.iterm2.com/#/section/home iTerm2] is the terminal application we prefer. | ** [http://www.iterm2.com/#/section/home iTerm2] is the terminal application we prefer. | ||
* Others | * Others | ||
− | ** There are many SSH clients for many different platforms available. While we don't have experience with many of these, any should be sufficient for access to | + | ** There are many SSH clients for many different platforms available. While we don't have experience with many of these, any should be sufficient for access to CS Linux systems. |
− | You'll need to connect your client (via the SSH protocol, if your client allows multiple protocols) to | + | You'll need to connect your client (via the SSH protocol, if your client allows multiple protocols) to cslinux.cs.ksu.edu. |
For command-line tools, the command to connect is | For command-line tools, the command to connect is | ||
− | <code>ssh username@ | + | <code>ssh username@cslinux.cs.ksu.edu</code> |
− | Your username is your | + | Your username is your CS login (usually the same as your [http://eid.ksu.edu K-State eID]) and the password is your CS password (which is only the same as your eID password if you set it manually or using our [https://password.cs.ksu.edu password reset page]). |
'''''Note:''''' When you type your password, nothing shows up on the screen, not even asterisks. | '''''Note:''''' When you type your password, nothing shows up on the screen, not even asterisks. | ||
Line 27: | Line 28: | ||
You'll know you are successfully logged in when you see a prompt that says | You'll know you are successfully logged in when you see a prompt that says | ||
− | |||
username@hostname:~$ | username@hostname:~$ | ||
− | |||
where ''hostname'' is the name of the machine you've logged into (currently either 'cougar' or 'viper') and ''username'' is your eID username | where ''hostname'' is the name of the machine you've logged into (currently either 'cougar' or 'viper') and ''username'' is your eID username | ||
+ | |||
+ | <div id="FileTransferLinux"></div> | ||
== How do I transfer files to/from Linux systems? == | == How do I transfer files to/from Linux systems? == | ||
− | Usually, one of the first things people want to do is to transfer files into or out of their | + | Usually, one of the first things people want to do is to transfer files into or out of their CS account. To do so, you need to use [http://en.wikipedia.org/wiki/Secure_copy SCP] (secure copy) or [http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol SFTP] (SSH FTP or Secure FTP). Again, there are multiple programs that do this. |
* Windows | * Windows | ||
** Putty (see above) has PSCP and PSFTP programs (both are included if you run the installer). It is a command-line interface (CLI) rather than a graphical user interface (GUI). | ** Putty (see above) has PSCP and PSFTP programs (both are included if you run the installer). It is a command-line interface (CLI) rather than a graphical user interface (GUI). | ||
Line 50: | Line 51: | ||
==== Example ==== | ==== Example ==== | ||
− | Transfer a file called myfile.txt in your current folder to your home directory on | + | Transfer a file called myfile.txt in your current folder to your home directory on CSLinux. |
I am using my username ("sgsax") here. You should replace this with your own when you run these commands. | I am using my username ("sgsax") here. You should replace this with your own when you run these commands. | ||
Using SCP: | Using SCP: | ||
− | + | scp myfile.txt sgsax@cslinux.cs.ksu.edu: | |
− | scp myfile.txt sgsax@ | ||
Password: (type your password here, it will not show any response on the screen) | Password: (type your password here, it will not show any response on the screen) | ||
myfile.txt 100% 0 0.0KB/s 00:00 | myfile.txt 100% 0 0.0KB/s 00:00 | ||
− | |||
Note the colon at the end of the 'scp' line. | Note the colon at the end of the 'scp' line. | ||
Using SFTP: | Using SFTP: | ||
− | + | sftp sgsax@cslinux.cs.ksu.edu | |
− | sftp sgsax@ | ||
Password: (type your password here, it will not show any response on the screen) | Password: (type your password here, it will not show any response on the screen) | ||
− | Connected to | + | Connected to cslinux.cs.ksu.edu. |
sftp> put myfile.txt | sftp> put myfile.txt | ||
Uploading myfile.txt to /home/s/sgsax/myfile.txt | Uploading myfile.txt to /home/s/sgsax/myfile.txt | ||
myfile.txt 100% 0 0.0KB/s 00:00 | myfile.txt 100% 0 0.0KB/s 00:00 | ||
sftp> exit | sftp> exit | ||
− | |||
− | SFTP is interactive, so this is a two-step process. First, you connect to | + | SFTP is interactive, so this is a two-step process. First, you connect to CSLinux, then you transfer the file. As long as the system gives the <code>sftp> </code> prompt, you are in the sftp program, and you will remain there until you type 'exit'. |
− | For more examples of advanced usage, please visit the [http://support.beocat | + | For more examples of advanced usage, please visit the [http://support.beocat.ksu.edu/BeocatDocs/index.php/LinuxBasics Beocat wiki]. |
== How do I use Linux? == | == How do I use Linux? == | ||
Line 97: | Line 94: | ||
You should now be able to login as usual. | You should now be able to login as usual. | ||
+ | <div id="KSUWifi"></div> | ||
== How do I get on KSU Wireless from my Linux laptop? == | == How do I get on KSU Wireless from my Linux laptop? == | ||
The official documentation from ITS for doing this is incorrect. The following settings should work for Ubuntu users, but other distros should be similar. Open your wireless connection settings and make these changes for the KSU Wireless network: | The official documentation from ITS for doing this is incorrect. The following settings should work for Ubuntu users, but other distros should be similar. Open your wireless connection settings and make these changes for the KSU Wireless network: |
Latest revision as of 15:11, 8 June 2020
NOTE: Parts of this document are borrowed heavily from the excellent documentation found in the Beocat wiki. Please have a look there for more details and in-depth examples.
How do I connect to Linux systems?
To login remotely to CS Linux systems, you first need an "SSH Client". SSH, short for "secure shell", is a protocol that allows secure communication between two computers. We recommend the following.
- Windows
- PuTTY is by far the most common SSH client, both for CS and in the world.
- MobaXterm is a fairly new client with some nice features, such as being able to SCP/SFTP (see below), and running X (Linux graphical desktop).
- Cygwin is for those that would rather be running Linux but are stuck on Windows. It's purely a text interface.
- Macintosh
- OS-X has SSH a built-in application called "Terminal". It's not great, but it will work for most CS users.
- iTerm2 is the terminal application we prefer.
- Others
- There are many SSH clients for many different platforms available. While we don't have experience with many of these, any should be sufficient for access to CS Linux systems.
You'll need to connect your client (via the SSH protocol, if your client allows multiple protocols) to cslinux.cs.ksu.edu.
For command-line tools, the command to connect is
ssh username@cslinux.cs.ksu.edu
Your username is your CS login (usually the same as your K-State eID) and the password is your CS password (which is only the same as your eID password if you set it manually or using our password reset page).
Note: When you type your password, nothing shows up on the screen, not even asterisks.
The first time you log into a new host, you will be asked to confirm adding the SSL signature to your local repository. Just say "yes" in whatever appropriate form when asked.
You'll know you are successfully logged in when you see a prompt that says
username@hostname:~$
where hostname is the name of the machine you've logged into (currently either 'cougar' or 'viper') and username is your eID username
How do I transfer files to/from Linux systems?
Usually, one of the first things people want to do is to transfer files into or out of their CS account. To do so, you need to use SCP (secure copy) or SFTP (SSH FTP or Secure FTP). Again, there are multiple programs that do this.
- Windows
- Putty (see above) has PSCP and PSFTP programs (both are included if you run the installer). It is a command-line interface (CLI) rather than a graphical user interface (GUI).
- MobaXterm (see above) has a built-in GUI SFTP client that automatically changes the directories as you change them in your SSH session.
- FileZilla (client) has an easy-to-use GUI. Be sure to use 'SFTP' mode rather than 'FTP' mode.
- WinSCP is another easy-to-use GUI.
- Cygwin (see above) has CLI scp and sftp programs.
- Macintosh
- FileZilla is also available for OS-X.
- Within terminal or iTerm, you can use the 'scp' or 'sftp' programs.
- Linux
- FileZilla also has a GUI linux version, in additon to the CLI tools.
Using a Command-Line Interface (CLI)
You can safely ignore this section if you're using a graphical interface (GUI).
Example
Transfer a file called myfile.txt in your current folder to your home directory on CSLinux.
I am using my username ("sgsax") here. You should replace this with your own when you run these commands.
Using SCP:
scp myfile.txt sgsax@cslinux.cs.ksu.edu: Password: (type your password here, it will not show any response on the screen) myfile.txt 100% 0 0.0KB/s 00:00
Note the colon at the end of the 'scp' line.
Using SFTP:
sftp sgsax@cslinux.cs.ksu.edu Password: (type your password here, it will not show any response on the screen) Connected to cslinux.cs.ksu.edu. sftp> put myfile.txt Uploading myfile.txt to /home/s/sgsax/myfile.txt myfile.txt 100% 0 0.0KB/s 00:00 sftp> exit
SFTP is interactive, so this is a two-step process. First, you connect to CSLinux, then you transfer the file. As long as the system gives the sftp>
prompt, you are in the sftp program, and you will remain there until you type 'exit'.
For more examples of advanced usage, please visit the Beocat wiki.
How do I use Linux?
Please read our Linux Primer
Why can't I login to the Linux lab?
Problem: When you try to login to a Linux lab desktop, the screen goes black and then reverts immediately to the login screen. No errors are displayed.
Cause: This is due to corruption or incompatibility of one of your X.org configuration files. The solution is to remove this file.
Resolution:
- Press <Ctrl>-<Alt>-<F1> to switch to a local virtual console and login using your regular credentials.
- At the prompt (ending with a $ character), type the following and press <Enter>
rm .Xauthority
- Logout using either
logout
orexit
- Switch back the the GUI login screen by pressing <Ctrl>-<Alt>-<F7>
You should now be able to login as usual.
How do I get on KSU Wireless from my Linux laptop?
The official documentation from ITS for doing this is incorrect. The following settings should work for Ubuntu users, but other distros should be similar. Open your wireless connection settings and make these changes for the KSU Wireless network:
- Security: WPA & WPA2 Enterprise
- Authentication: Protected EAP (PEAP)
- CA certificate: AddTrust_External_Root.pem (may need to manually locate this in
/etc/ssl/certs
) - PEAP version: Automatic
- Inner authentication: MSCHAPv2
- Username:
<your eID>
- Password:
<your eID password>
(or leave blank to be prompted)