Linux Questions
NOTE: This document borrows 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 get started with Linux?
Getting Connected
To login remotely to CIS 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 CIS 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 CIS 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 CIS Linux systems.
You'll need to connect your client (via the SSH protocol, if your client allows multiple protocols) to cislinux.cis.ksu.edu.
For command-line tools, the command to connect is
ssh username@cislinux.cis.ksu.edu
Your username is your CIS login (usually the same as your K-State eID) and the password is your CIS 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
Transferring files (SCP or SFTP)
Usually, one of the first things people want to do is to transfer files into or out of their CIS 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 CISLinux.
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@cislinux.cis.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@cislinux.cis.ksu.edu
Password: (type your password here, it will not show any response on the screen)
Connected to cislinux.cis.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 CISLinux, 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.